Exemplo n.º 1
0
 def on_success(self, success_entity):
     mac.set_entity(self)
     contacts = self.getProp(self.__class__.PROP_CONTACTS, [])
     #print("Sync contacts sucess: " + helper.nice_list(contacts))
     contact_entity = GetSyncIqProtocolEntity(contacts)
     self._sendIq(contact_entity, self.on_sync_result, self.on_sync_error)
     signals.initialized.send(self)
Exemplo n.º 2
0
    def on_message(self, message_entity):
        if helper.is_text_message(message_entity):
            mac.set_entity(self)

            # Set received (double v) and add to ack queue
            mac.receive_message(self, message_entity)

            # Send signal
            self.send_message_signal(message_entity)

            # Finally set offline
            mac.disconnect(self)
Exemplo n.º 3
0
    def on_message(self, message_entity):
        if helper.is_text_message(message_entity):
            mac.set_entity(self)

            # Set received (double v) and add to ack queue
            mac.receive_message(self, message_entity)

            # Handle intercepts if needed}
            # Not needed anymore
            #receiver.intercept(self, message_entity)

            # Send signal
            self.send_message_signal(message_entity)

            # Finally set offline
            mac.disconnect(self)