summaryrefslogtreecommitdiff
path: root/sunshine/channel
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2011-05-07 19:35:37 +0200
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2011-05-07 19:35:37 +0200
commit8ff397fe727857e1207a6f4b3b1acd915456d877 (patch)
tree8ff68e3786ccbfdb1a404cbabb50e4d5837dd641 /sunshine/channel
parenta4cd7229e2e931dbf3f8f3968b89213850f67885 (diff)
Added Message.MessageTypes support in text channel.
Diffstat (limited to 'sunshine/channel')
-rw-r--r--sunshine/channel/text.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sunshine/channel/text.py b/sunshine/channel/text.py
index 8d1ad3f..c182205 100644
--- a/sunshine/channel/text.py
+++ b/sunshine/channel/text.py
@@ -59,13 +59,15 @@ class SunshineTextChannel(SunshineChannel,
'SupportedContentTypes': lambda: ["text/plain"],
'MessagePartSupportFlags': lambda: 1,
'DeliveryReportingSupport': lambda: 0,
- 'PendingMessages': lambda: dbus.Array(self._pending_messages2.values(), signature='aa{sv}')
+ 'PendingMessages': lambda: dbus.Array(self._pending_messages2.values(), signature='aa{sv}'),
+ 'MessageTypes': lambda: message_type != telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL
})
self._add_immutables({
'SupportedContentTypes': CHANNEL_INTERFACE_MESSAGES,
'MessagePartSupportFlags': CHANNEL_INTERFACE_MESSAGES,
'DeliveryReportingSupport': CHANNEL_INTERFACE_MESSAGES,
+ 'MessageTypes': CHANNEL_INTERFACE_MESSAGES,
})
def Send(self, message_type, text):