# HG changeset patch # User Goffi # Date 1665064925 -7200 # Node ID 13a2403774d4c21de74ea606a1a50154ee6e6343 # Parent 0ff2657254893f249bae27bb5b1c1740a5df4404 plugin XEP-0334: avoid adding twice the same hint: rel 379 diff -r 0ff265725489 -r 13a2403774d4 sat/plugins/plugin_xep_0334.py --- a/sat/plugins/plugin_xep_0334.py Thu Oct 06 16:02:05 2022 +0200 +++ b/sat/plugins/plugin_xep_0334.py Thu Oct 06 16:02:05 2022 +0200 @@ -92,7 +92,10 @@ @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: