import telepathy
-import handle
-
class TheOneRingChannelText(
telepathy.server.ChannelTypeText,
- telepathy.server.ChannelInterfaceGroup,
- telepathy.server.ChannelInterfaceChatState
):
def __init__(self, connection, conversation):
self.GroupFlagsChanged(telepathy.CHANNEL_GROUP_FLAG_CAN_ADD, 0)
self.__add_initial_participants()
- def SetChatState(self, state):
- if state == telepathy.CHANNEL_CHAT_STATE_COMPOSING:
- self._conversation.send_typing_notification()
- h = handle.create_handle(self._conn_ref(), 'self')
- self.ChatStateChanged(h, state)
-
def Send(self, messageType, text):
if messageType == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
self._conversation.send_text_message(text)