comparison sat/core/xmpp.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 33fa70c102de
children 368a60f05d0e
comparison
equal deleted inserted replaced
2819:fd45089b3a92 2820:7ab8684784c6
1245 1245
1246 if None in statuses: # we only want string keys 1246 if None in statuses: # we only want string keys
1247 statuses[C.PRESENCE_STATUSES_DEFAULT] = statuses.pop(None) 1247 statuses[C.PRESENCE_STATUSES_DEFAULT] = statuses.pop(None)
1248 1248
1249 if not self.host.trigger.point( 1249 if not self.host.trigger.point(
1250 "presenceReceived", entity, show, priority, statuses, self.parent.profile 1250 "presence_received", self.parent, entity, show, priority, statuses
1251 ): 1251 ):
1252 return 1252 return
1253 1253
1254 self.host.memory.setPresenceStatus( 1254 self.host.memory.setPresenceStatus(
1255 entity, show or "", int(priority), statuses, self.parent.profile 1255 entity, show or "", int(priority), statuses, self.parent.profile
1271 1271
1272 if None in statuses: # we only want string keys 1272 if None in statuses: # we only want string keys
1273 statuses[C.PRESENCE_STATUSES_DEFAULT] = statuses.pop(None) 1273 statuses[C.PRESENCE_STATUSES_DEFAULT] = statuses.pop(None)
1274 1274
1275 if not self.host.trigger.point( 1275 if not self.host.trigger.point(
1276 "presenceReceived", entity, "unavailable", 0, statuses, self.parent.profile 1276 "presence_received", self.parent, entity, C.PRESENCE_UNAVAILABLE, 0, statuses,
1277 ): 1277 ):
1278 return 1278 return
1279 1279
1280 # now it's time to notify frontends 1280 # now it's time to notify frontends
1281 # if the entity is not known yet in this session or is already unavailable, 1281 # if the entity is not known yet in this session or is already unavailable,