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
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
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
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
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
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