summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0115/caps.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/plugins/xep_0115/caps.py')
-rw-r--r--slixmpp/plugins/xep_0115/caps.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0115/caps.py b/slixmpp/plugins/xep_0115/caps.py
index b7f29516..9b2d499e 100644
--- a/slixmpp/plugins/xep_0115/caps.py
+++ b/slixmpp/plugins/xep_0115/caps.py
@@ -15,6 +15,7 @@ from slixmpp.stanza import StreamFeatures, Presence, Iq
from slixmpp.xmlstream import register_stanza_plugin, JID
from slixmpp.xmlstream.handler import Callback
from slixmpp.xmlstream.matcher import StanzaPath
+from slixmpp.util import MemoryCache
from slixmpp import asyncio
from slixmpp.exceptions import XMPPError, IqError, IqTimeout
from slixmpp.plugins import BasePlugin
@@ -37,7 +38,8 @@ class XEP_0115(BasePlugin):
default_config = {
'hash': 'sha-1',
'caps_node': None,
- 'broadcast': True
+ 'broadcast': True,
+ 'cache': None,
}
def plugin_init(self):
@@ -48,6 +50,9 @@ class XEP_0115(BasePlugin):
if self.caps_node is None:
self.caps_node = 'http://slixmpp.com/ver/%s' % __version__
+ if self.cache is None:
+ self.cache = MemoryCache()
+
register_stanza_plugin(Presence, stanza.Capabilities)
register_stanza_plugin(StreamFeatures, stanza.Capabilities)