Ejemplo n.º 1
0
    def _last(self, roster, jid, conn):
        """Send the last presence information for this account to a
        newly subscribed JID."""

        for last in roster.last():
            last = copy.deepcopy(last)
            last.set('to', jid)
            conn.send(jid, last)
        return conn
Ejemplo n.º 2
0
    def _last(self, roster, jid, conn):
        """Send the last presence information for this account to a
        newly subscribed JID."""

        for last in roster.last():
            # don't send your own presence back
            #if last.get('from') != jid:
            last = copy.deepcopy(last)
            last.set('to', jid)
            conn.send(jid, last)
        return conn