def restore(self, jid, state):
     jid = jid_entity.ContactBareJID(jid)
     channel = entities.XMPPChatChannelEntity(jid_entity.ContactBareJID(jid))
     result = channel.setPersistentState(state)
     if result and not self.hasChannel(channel.getID()):
         self.__addSession(channel, jid.getDatabaseID())
     return result
Ejemplo n.º 2
0
 def sendGroupChatMessage(self, jid, body):
     if self.__cooldown.isInProcess(CLIENT_ACTION_ID.SEND_MESSAGE):
         g_messengerEvents.onErrorReceived(ChatCoolDownError(CLIENT_ACTION_ID.SEND_MESSAGE, self.__limits.getBroadcastCoolDown()))
         return
     body = self.__msgFilters.chainOut(body, self.__limits)
     if not body:
         return
     self.__muc.sendMessage(jid_entity.ContactBareJID(jid), body, self.__msgFilters)
     self.__cooldown.process(CLIENT_ACTION_ID.SEND_MESSAGE)