fritzy / SleekXMPP

Python 2.6+/3.1+ XMPP Library
http://groups.google.com/group/sleekxmpp-discussion
Other
1.1k stars 299 forks source link

Does the current plug-in model support implementation of XEP-0115: 'Entity Capabilities'? #85

Closed dannmartens closed 12 years ago

dannmartens commented 13 years ago

We'd like the SleekXMPP client to report on itself in terms of name, version and supported features.

The standards point out that 'the jabber:iq:version protocol SHOULD NOT be used to determine the identity of entities from which an application receives presence. Entity Capabilities SHOULD be used instead.'

Part of XEP-0115 prescribes the use of a C-tag inside a presence message:

<presence from='romeo@montague.lit/orchard'>
  <c xmlns='http://jabber.org/protocol/caps' 
     hash='sha-1'
     node='http://code.google.com/p/exodus'
     ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
</presence>

Is it possible to introduce this behavior through a regular Sleek plug-in?

Thanks!

legastero commented 13 years ago

Yes it is possible. Dalek from the sleek@conference.jabber.org chat room has tackled this. Here is the main plugin code that he has done: http://pastebin.com/Lq06ufLQ

That link doesn't include the caps stanza itself, but that is simple to add.

We are looking at adding a version of his work into Sleek soon.

fritzy commented 13 years ago

This is scheduled for 1.1, which is starting up this week.

dannmartens commented 13 years ago

Cool. We are currently evaluating our own fixes to XEP-0009. If all goes well, we would like to proceed to do a Pull Request. We're missing out on all those wonderful fixes you guys have committed up to now.