diff options
author | Lance Stout <lancestout@gmail.com> | 2012-09-11 20:28:28 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-09-11 20:28:28 -0700 |
commit | 26fa9bd87e1c722c442bb793c77a4eeb649998c7 (patch) | |
tree | 9aff39bc50ca1423f820f8a04e8bed014db52251 /sleekxmpp | |
parent | 0016d9a638dfe3aca7cc526ad78f7c3f9971a591 (diff) | |
download | slixmpp-26fa9bd87e1c722c442bb793c77a4eeb649998c7.tar.gz slixmpp-26fa9bd87e1c722c442bb793c77a4eeb649998c7.tar.bz2 slixmpp-26fa9bd87e1c722c442bb793c77a4eeb649998c7.tar.xz slixmpp-26fa9bd87e1c722c442bb793c77a4eeb649998c7.zip |
Don't perform caps lookup if the disco info is already known.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/plugins/xep_0115/caps.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0115/caps.py b/sleekxmpp/plugins/xep_0115/caps.py index 5130cc98..b7a346c0 100644 --- a/sleekxmpp/plugins/xep_0115/caps.py +++ b/sleekxmpp/plugins/xep_0115/caps.py @@ -143,6 +143,11 @@ class XEP_0115(BasePlugin): if str(existing_verstring) == str(pres['caps']['ver']): return + existing_caps = self.get_caps(verstring=pres['caps']['ver']) + if existing_caps is not None: + self.assign_verstring(pres['from'], pres['caps']['ver']) + return + if pres['caps']['hash'] not in self.hashes: try: log.debug("Unknown caps hash: %s", pres['caps']['hash']) |