예제 #1
0
파일: rosters.py 프로젝트: xuzhao9/pybbs
    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
예제 #2
0
파일: rosters.py 프로젝트: net9/pybbs
    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