Upating telepathy python to a7418e92965713edae61d9e762b8c895a68a7251
authorEd Page <eopage@byu.net>
Sat, 29 May 2010 00:54:08 +0000 (19:54 -0500)
committerEd Page <eopage@byu.net>
Sat, 29 May 2010 00:56:24 +0000 (19:56 -0500)
src/tp/channel.py
src/tp/conn.py

index 530966e..e53134a 100644 (file)
@@ -294,7 +294,10 @@ class ChannelTypeText(Channel, _ChannelTypeTextIface):
 
     @dbus.service.signal(CHANNEL_TYPE_TEXT, signature='uuuuus')
     def Received(self, id, timestamp, sender, type, flags, text):
-        self._pending_messages[id] = (timestamp, sender, type, flags, text)
+        if id in self._pending_messages:
+            raise ValueError("You can't receive the same message twice.")
+        else:
+            self._pending_messages[id] = (timestamp, sender, type, flags, text)
 
 
 from telepathy._generated.Channel_Interface_Chat_State \
index 02305c4..256a574 100644 (file)
@@ -91,8 +91,11 @@ class Connection(_Connection, DBusProperties):
         self._interfaces = set()
 
         DBusProperties.__init__(self)
-        self._implement_property_get(CONN_INTERFACE,
-                {'SelfHandle': lambda: dbus.UInt32(self.GetSelfHandle())})
+        self._implement_property_get(CONN_INTERFACE, {
+                'SelfHandle': lambda: dbus.UInt32(self.GetSelfHandle()),
+                'Interfaces': lambda: dbus.Array(self.GetInterfaces(), signature='s'),
+                'Status': lambda: dbus.UInt32(self.GetStatus())
+                 })
 
         self._proto = proto