quick_frontend: register the 'personalEvent' signal
This commit is contained in:
parent
728d264136
commit
6336e629c0
1 changed files with 11 additions and 0 deletions
|
|
@ -269,6 +269,7 @@ class QuickApp(object):
|
|||
self.registerSignal("quizGameTimerExpired", iface="plugin")
|
||||
self.registerSignal("quizGameTimerRestarted", iface="plugin")
|
||||
self.registerSignal("chatStateReceived", iface="plugin")
|
||||
self.registerSignal("personalEvent", iface="plugin")
|
||||
|
||||
self.current_action_ids = set() # FIXME: to be removed
|
||||
self.current_action_ids_cb = {} # FIXME: to be removed
|
||||
|
|
@ -688,6 +689,16 @@ class QuickApp(object):
|
|||
if from_jid == C.ENTITY_ALL or from_jid.bare == widget.target.bare:
|
||||
widget.updateChatState(from_jid, state)
|
||||
|
||||
def personalEventHandler(self, sender, event_type, data):
|
||||
"""Called when a PEP event is received.
|
||||
|
||||
@param sender (jid.JID): event sender
|
||||
@param event_type (unicode): event type, e.g. 'MICROBLOG' or 'MICROBLOG_DELETE'
|
||||
@param data (dict): event data
|
||||
"""
|
||||
# FIXME move some code from Libervia to here and put the magic strings to constants
|
||||
pass
|
||||
|
||||
def _subscribe_cb(self, answer, data):
|
||||
entity, profile = data
|
||||
type_ = "subscribed" if answer else "unsubscribed"
|
||||
|
|
|
|||
Loading…
Reference in a new issue