diff --git a/sat/plugins/plugin_xep_0334.py b/sat/plugins/plugin_xep_0334.py index d1c3416f..571cdf55 100644 --- a/sat/plugins/plugin_xep_0334.py +++ b/sat/plugins/plugin_xep_0334.py @@ -92,7 +92,10 @@ class XEP_0334(object): @param hints: hints to add """ 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 ') def _sendPostXmlTreatment(self, mess_data): if "hints" in mess_data: