Commit graph

12 commits

Author SHA1 Message Date
Lance Stout
d5e42ac0e7 Condensed all of the stanzaPlugin functions into a single registerStanzaPlugin function.
Updated plugins and tests to use new function.
2010-07-19 13:58:53 -04:00
Lance Stout
6041cd1952 Fixed typo 2010-06-27 16:33:59 -04:00
Lance Stout
e700a54d11 Return result of iq.send() for disco requests. Events are still triggered, but now the caller can determine if there was a timeout. 2010-06-02 15:59:10 -04:00
Lance stout
01e8040a07 Added additional parameter to xep_0030's getInfo and getItems methods.
By using dfrom, a server component may send disco requests using any of its JIDS.
2010-06-01 10:51:03 -04:00
Lance stout
332eea3b3b Make sure that the node is alway set in disco responses. 2010-05-31 13:35:15 -04:00
Lance stout
4f864a07f5 Touched up the style of creating an Iq stanza. 2010-05-31 05:30:49 +08:00
Lance Stout
fd573880eb Updated the XEP-0030 plugin to work with stanza objects instead of manipulating XML directly.
Four new events have been added:
  disco_info - A disco#info result has been received
  disco_info_request - A disco#info request has been received
  disco_items - A disco#items result has been received
  disco_items_request - A disco#items request has been received

For disco_info_request and disco_items_request two default handlers are registered. These handlers will only run if they are the only handler for these two events so that multiple responses are not returned and cause errors.

In your own handlers for these two events, you can call the default handlers to preserve the static node behaviour as so:
  self.plugin['xep_0030'].handle_disco_info(iq, True)

The forwarded=True will disable the check for other registered handlers.

Agents can now dynamically respond to disco requests by using these events.
(cherry picked from commit 0fc3381492a8bd75e6a9858539a972334881d8ff)
2010-05-31 05:30:45 +08:00
Nathan Fritz
ecd5a172ed replaced usage of deprecated iq result on send. Fixed old send result to use stanzas instead of ElementTree 2010-04-07 23:10:32 -07:00
Nathan Fritz
e39a2395d7 xep 30 and 50 always reply from jid iq sent to 2010-01-15 21:07:28 -08:00
Nathan Fritz
b9f7af885c * fixed some python3 transition bugs
* added status options to muc joining
2009-09-01 17:24:52 +00:00
Nathan Fritz
05c9ea5c1d * converted sleekxmpp to Python 3.x
* sleekxmpp no longer spawns threads for callback handlers -- there are now two threads: one for handlers and one for reading. callback handlers can get results from the read queue directly with the "wait" handler which is used in .send() for the reply catching argument.
2009-08-31 22:46:31 +00:00
Nathan Fritz
96b103b275 moved seesmic branch to trunk 2009-06-03 22:56:51 +00:00