More caps cleanup

This commit is contained in:
Lance Stout 2013-02-11 20:01:53 -08:00
parent cdeae7e72f
commit 99ecb166d3

View File

@ -207,7 +207,10 @@ class XEP_0115(BasePlugin):
form_types = [] form_types = []
deduped_form_types = set() deduped_form_types = set()
for stanza in caps['substanzas']: for stanza in caps['substanzas']:
if isinstance(stanza, self.xmpp['xep_0004'].stanza.Form): if not isinstance(stanza, self.xmpp['xep_0004'].stanza.Form):
log.debug("Non form extension found, ignoring for caps")
caps.xml.remove(stanza.xml)
continue
if 'FORM_TYPE' in stanza['fields']: if 'FORM_TYPE' in stanza['fields']:
f_type = tuple(stanza['fields']['FORM_TYPE']['value']) f_type = tuple(stanza['fields']['FORM_TYPE']['value'])
form_types.append(f_type) form_types.append(f_type)