Exemplo n.º 1
0
    def steal_conversation(self):
        # Set offline contact details for this 1-1 chat.
        self._offline_handle = self._initial_handle
        self._offline_contact = self._initial_handle.contact

        # If this 1-1 chat has been idle for sometime, the switchboard will
        # close, so the participant list will be an empty set. If we then
        # create a channel with the conference interface and then try and
        # extend from this conversation, there won't be any participants.
        # Let's reinvite them now.
        if self._conversation:
            if len(self._conversation.participants) == 0:
                self._conversation.invite_user(self._initial_handle.contact)

        return ButterflyTextChannel.steal_conversation(self)
Exemplo n.º 2
0
    def steal_conversation(self):
        # Set offline contact details for this 1-1 chat.
        self._offline_handle = self._initial_handle
        self._offline_contact = self._initial_handle.contact

        # If this 1-1 chat has been idle for sometime, the switchboard will
        # close, so the participant list will be an empty set. If we then
        # create a channel with the conference interface and then try and
        # extend from this conversation, there won't be any participants.
        # Let's reinvite them now.
        if self._conversation:
            if len(self._conversation.participants) == 0:
                self._conversation.invite_user(self._initial_handle.contact)

        return ButterflyTextChannel.steal_conversation(self)