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

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0085.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/plugins/plugin_xep_0085.py	Wed Jun 19 18:44:57 2024 +0200
@@ -100,7 +100,9 @@
     def __init__(self, host):
         log.info(_("Chat State Notifications plugin initialization"))
         self.host = host
-        self.map = {}  # FIXME: would be better to use client instead of mapping profile to data
+        self.map = (
+            {}
+        )  # FIXME: would be better to use client instead of mapping profile to data
 
         # parameter value is retrieved before each use
         host.memory.update_params(self.params)
@@ -149,9 +151,7 @@
         if value == DELETE_VALUE:
             self.host.memory.del_entity_datum(client, entity_jid, ENTITY_KEY)
         else:
-            self.host.memory.update_entity_data(
-                client, entity_jid, ENTITY_KEY, value
-            )
+            self.host.memory.update_entity_data(client, entity_jid, ENTITY_KEY, value)
         if not value or value == DELETE_VALUE:
             # reinit chat state UI for this or these contact(s)
             self.host.bridge.chat_state_received(entity_jid.full(), "", profile)
@@ -260,7 +260,8 @@
         client = self.host.get_client(profile)
         try:
             type_ = self.host.memory.get_entity_datum(
-                client, to_jid.userhostJID(), C.ENTITY_TYPE)
+                client, to_jid.userhostJID(), C.ENTITY_TYPE
+            )
             if type_ == C.ENTITY_TYPE_MUC:
                 return True
         except (exceptions.UnknownEntityError, KeyError):