comparison src/plugins/plugin_xep_0085.py @ 2007:19b9d3f8a6c7

plugin XEP-0085, quick_frontends, primitivus: chat states are working again
author Goffi <goffi@goffi.org>
date Sun, 17 Jul 2016 16:47:33 +0200
parents 200cd707a46d
children 6a66c8c5a567
comparison
equal deleted inserted replaced
2006:0ddf3edf643a 2007:19b9d3f8a6c7
94 } 94 }
95 95
96 def __init__(self, host): 96 def __init__(self, host):
97 log.info(_("Chat State Notifications plugin initialization")) 97 log.info(_("Chat State Notifications plugin initialization"))
98 self.host = host 98 self.host = host
99 self.map = {} 99 self.map = {} # FIXME: would be better to use client instead of mapping profile to data
100 100
101 # parameter value is retrieved before each use 101 # parameter value is retrieved before each use
102 host.memory.updateParams(self.params) 102 host.memory.updateParams(self.params)
103 103
104 # triggers from core 104 # triggers from core
139 self.host.memory.delEntityDatum(entity_jid, ENTITY_KEY, profile) 139 self.host.memory.delEntityDatum(entity_jid, ENTITY_KEY, profile)
140 else: 140 else:
141 self.host.memory.updateEntityData(entity_jid, ENTITY_KEY, value, profile_key=profile) 141 self.host.memory.updateEntityData(entity_jid, ENTITY_KEY, value, profile_key=profile)
142 if not value or value == DELETE_VALUE: 142 if not value or value == DELETE_VALUE:
143 # reinit chat state UI for this or these contact(s) 143 # reinit chat state UI for this or these contact(s)
144 self.host.bridge.chatStateReceived(unicode(entity_jid), "", profile) 144 self.host.bridge.chatStateReceived(entity_jid.full(), "", profile)
145 145
146 def paramUpdateTrigger(self, name, value, category, type_, profile): 146 def paramUpdateTrigger(self, name, value, category, type_, profile):
147 """Reset all the existing chat state entity data associated with this profile after a parameter modification. 147 """Reset all the existing chat state entity data associated with this profile after a parameter modification.
148 148
149 @param name: parameter name 149 @param name: parameter name