plugin XEP-0334: avoid adding twice the same hint:
rel 379
This commit is contained in:
parent
a8fc70fca6
commit
aea64e7b87
1 changed files with 4 additions and 1 deletions
|
|
@ -92,7 +92,10 @@ class XEP_0334(object):
|
||||||
@param hints: hints to add
|
@param hints: hints to add
|
||||||
"""
|
"""
|
||||||
for hint in hints:
|
for hint in hints:
|
||||||
message_elt.addElement((NS_HINTS, hint))
|
if not list(message_elt.elements(NS_HINTS, hint)):
|
||||||
|
message_elt.addElement((NS_HINTS, hint))
|
||||||
|
else:
|
||||||
|
log.debug('Not adding {hint!r} hint: it is already present in <message>')
|
||||||
|
|
||||||
def _sendPostXmlTreatment(self, mess_data):
|
def _sendPostXmlTreatment(self, mess_data):
|
||||||
if "hints" in mess_data:
|
if "hints" in mess_data:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue