示例#1
0
 def handle_presence_subscribe(self, stanza):
     logger.info("-- {0!r} requested presence subscription".format(stanza.from_jid))
     if settings.Roster.auto_accept:
         presence = self.request_add_friend(stanza.from_jid, send=False)
         return [stanza.make_accept_response(), presence]
     else:
         FriendNotice.record_from_stanza(stanza)
     return True    
示例#2
0
 def handle_presence_subscribe(self, stanza):
     logger.info("-- {0!r} requested presence subscription".format(
         stanza.from_jid))
     if settings.Roster.auto_accept:
         presence = self.request_add_friend(stanza.from_jid, send=False)
         return [stanza.make_accept_response(), presence]
     else:
         FriendNotice.record_from_stanza(stanza)
     return True
示例#3
0
 def handle_presence_unsubscribed(self, stanza):
     logging.info("{0!r} acknowledged our subscrption cancelation".format(stanza.from_jid))
     FriendNotice.record_from_stanza(stanza)
     return True
示例#4
0
 def handle_presence_subscribed(self, stanza):
     logging.info("{0!r} accepted our subscription request".format(stanza.from_jid))
     FriendNotice.record_from_stanza(stanza)
     return True
示例#5
0
 def handle_presence_unsubscribed(self, stanza):
     logging.info("{0!r} acknowledged our subscrption cancelation".format(
         stanza.from_jid))
     FriendNotice.record_from_stanza(stanza)
     return True
示例#6
0
 def handle_presence_subscribed(self, stanza):
     logging.info("{0!r} accepted our subscription request".format(
         stanza.from_jid))
     FriendNotice.record_from_stanza(stanza)
     return True