N
N
Nikita Kamenev2015-08-06 20:12:18
Python
Nikita Kamenev, 2015-08-06 20:12:18

How to auto approve incoming applications in xmpppy?

It is necessary to make automatic addition of friends in xmpppy.
Any incoming application must be approved and if the user wrote a message without a request to add it, add it. Tell me how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Kamenev, 2015-08-07
@NickStone

I found it myself guys!

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

client.RegisterHandler('presence', presence)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question