Look into implementing ChannelInterfaceMessages for rich text formatting
"""
- def __init__(self, connection, conversation):
+ def __init__(self, connection):
self._recv_id = 0
- self._conversation = conversation
self._connRef = weakref.ref(connection)
telepathy.server.ChannelTypeText.__init__(self, connection, None)
def Send(self, messageType, text):
if messageType == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
- self._conversation.send_text_message(text)
- elif messageType == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_ACTION and text == u"nudge":
- self._conversation.send_nudge()
+ pass
else:
raise telepathy.NotImplemented("Unhandled message type")
self.Sent(int(time.time()), messageType, text)