diff sat/plugins/plugin_sec_otr.py @ 2820:7ab8684784c6

core: renamed presenceReceived to presence_reveiced + use "client" as first arguments instead of "profile"
author Goffi <goffi@goffi.org>
date Fri, 01 Mar 2019 12:12:50 +0100
parents ba2e03ee7c4f
children 3d735e0ab2fa
line wrap: on
line diff
--- a/sat/plugins/plugin_sec_otr.py	Fri Mar 01 12:11:16 2019 +0100
+++ b/sat/plugins/plugin_sec_otr.py	Fri Mar 01 12:12:50 2019 +0100
@@ -354,7 +354,7 @@
         #     security_limit=0,
         #     type_=C.MENU_SINGLE,
         # )
-        host.trigger.add("presenceReceived", self._presenceReceivedTrigger)
+        host.trigger.add("presence_received", self._presenceReceivedTrigger)
         self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR, directed=True)
 
     def _skipOTR(self, profile):
@@ -810,10 +810,9 @@
                 mess_data["to"] = to_jid
         return True
 
-    def _presenceReceivedTrigger(self, entity, show, priority, statuses, profile):
+    def _presenceReceivedTrigger(self, client, entity, show, priority, statuses):
         if show != C.PRESENCE_UNAVAILABLE:
             return True
-        client = self.host.getClient(profile)
         if not entity.resource:
             try:
                 entity.resource = self.host.memory.getMainResource(