Don't perform caps lookup if the disco info is already known.
This commit is contained in:
parent
0016d9a638
commit
26fa9bd87e
@ -143,6 +143,11 @@ class XEP_0115(BasePlugin):
|
|||||||
if str(existing_verstring) == str(pres['caps']['ver']):
|
if str(existing_verstring) == str(pres['caps']['ver']):
|
||||||
return
|
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:
|
if pres['caps']['hash'] not in self.hashes:
|
||||||
try:
|
try:
|
||||||
log.debug("Unknown caps hash: %s", pres['caps']['hash'])
|
log.debug("Unknown caps hash: %s", pres['caps']['hash'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user