From d979b5f2b9cb38bdd145c95526358238449fa067 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 28 Dec 2011 10:07:33 -0500 Subject: Add caching support to xep_0030. New plugin configuration options: use_cache - Enable caching disco info results. Defaults to True wrap_results - Always return disco results in an Iq stanza. Defaults to False Node handler changes: Handlers now take four arguments: jid, node, ifrom, data Most older style handlers will still work, depending on if they raise a TypeError for incorrect number of arguments. Handlers that used *args may not work. New get_info options: cached - Passing cached=True to get_info() will attempt to load results from the cache. If nothing is found, a query will be sent as normal. If set to False, the cache will be skipped, even if it contains results. New method: supports() - Given a JID/node pair and a feature, return True if the feature is supported, False if not, and None if there was a timeout. By default, the search will use the cache. --- sleekxmpp/plugins/xep_0128/extended_disco.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/plugins/xep_0128/extended_disco.py') diff --git a/sleekxmpp/plugins/xep_0128/extended_disco.py b/sleekxmpp/plugins/xep_0128/extended_disco.py index 63b3cfee..5bb78320 100644 --- a/sleekxmpp/plugins/xep_0128/extended_disco.py +++ b/sleekxmpp/plugins/xep_0128/extended_disco.py @@ -76,7 +76,7 @@ class xep_0128(base_plugin): as extended information, replacing any existing extensions. """ - self.disco._run_node_handler('set_extended_info', jid, node, kwargs) + self.disco._run_node_handler('set_extended_info', jid, node, None, kwargs) def add_extended_info(self, jid=None, node=None, **kwargs): """ @@ -88,7 +88,7 @@ class xep_0128(base_plugin): data -- Either a form, or a list of forms to add as extended information. """ - self.disco._run_node_handler('add_extended_info', jid, node, kwargs) + self.disco._run_node_handler('add_extended_info', jid, node, None, kwargs) def del_extended_info(self, jid=None, node=None, **kwargs): """ @@ -98,4 +98,4 @@ class xep_0128(base_plugin): jid -- The JID to modify. node -- The node to modify. """ - self.disco._run_node_handler('del_extended_info', jid, node, kwargs) + self.disco._run_node_handler('del_extended_info', jid, node, None, kwargs) -- cgit v1.2.3