def presence(self, conn, nod): if nod.getType() == 'subscribe': conn.send(Presence(to=event.getFrom(), typ='subscribed'))