7 class TextChannel(telepathy.server.ChannelTypeText):
9 Look into implementing ChannelInterfaceMessages for rich text formatting
12 def __init__(self, connection):
14 self._connRef = weakref.ref(connection)
16 telepathy.server.ChannelTypeText.__init__(self, connection, None)
18 self.GroupFlagsChanged(telepathy.CHANNEL_GROUP_FLAG_CAN_ADD, 0)
19 self.__add_initial_participants()
21 def Send(self, messageType, text):
22 if messageType == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
25 raise telepathy.NotImplemented("Unhandled message type")
26 self.Sent(int(time.time()), messageType, text)
29 self._conversation.leave()
30 telepathy.server.ChannelTypeText.Close(self)
31 self.remove_from_connection()