diff libervia/backend/plugins/plugin_xep_0334.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 3b3cd9453d9b
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0334.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/plugins/plugin_xep_0334.py	Wed Jun 19 18:44:57 2024 +0200
@@ -68,7 +68,9 @@
         log.info(_("Message Processing Hints plugin initialization"))
         self.host = host
         host.trigger.add("sendMessage", self.send_message_trigger)
-        host.trigger.add("message_received", self.message_received_trigger, priority=-1000)
+        host.trigger.add(
+            "message_received", self.message_received_trigger, priority=-1000
+        )
 
     def get_handler(self, client):
         return XEP_0334_handler()
@@ -85,7 +87,9 @@
         else:
             log.error("Unknown hint: {}".format(hint))
 
-    def add_hint_elements(self, message_elt: domish.Element, hints: Iterable[str]) -> None:
+    def add_hint_elements(
+        self, message_elt: domish.Element, hints: Iterable[str]
+    ) -> None:
         """Add hints elements to message stanza
 
         @param message_elt: stanza where hints must be added
@@ -95,7 +99,7 @@
             if not list(message_elt.elements(NS_HINTS, hint)):
                 message_elt.addElement((NS_HINTS, hint))
             else:
-                log.debug(f'Not adding {hint!r} hint: it is already present in <message>')
+                log.debug(f"Not adding {hint!r} hint: it is already present in <message>")
 
     def _send_post_xml_treatment(self, mess_data):
         if "hints" in mess_data: