开发者

XMPPPY have function to manage invitation in client side?

I'm coding by python about Gtalk I use XMPPPY.

B开发者_C百科ut I can chat with GTalk client but the problem is I can't accept invitation.

Is XMPPY can do ?


Looks like you want to "authorize" the request. I'm assuming you've received the request at the client. In the roster class (xmpp.roster) there is an "Authorize" method. It sends the "subscribed" packet to accept the roster request. This is what the method looks like:

def Authorize(self,jid):
  """ Authorise JID 'jid'. Works only if these JID requested auth previously. """ 
  self._owner.send(Presence(jid,'subscribed')) 

Wait, that may not be what you're asking at all. Are you trying to process a chat or a roster request? Take a look at the example (small) client they have called xtalk.py. I think you're interested in the xmpp_message method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜