core: renamed presenceReceived to presence_reveiced + use "client" as first arguments instead of "profile"
This commit is contained in:
parent
f3a585aa94
commit
6033a0a0cb
1 changed files with 11 additions and 10 deletions
|
|
@ -354,7 +354,7 @@ class OTR(object):
|
|||
# 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 @@ class OTR(object):
|
|||
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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue