示例#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