Added presence hooks to test plugins

This commit is contained in:
James Booth
2016-03-30 23:19:10 +01:00
parent b48aa0ceb1
commit f4accf64ef
2 changed files with 46 additions and 0 deletions

View File

@@ -469,3 +469,17 @@ def prof_on_iq_stanza_receive(stanza):
_create_win()
prof.win_show(plugin_win, "fired -> prof_on_iq_stanza_receive: " + stanza)
return True
def prof_on_contact_offline(barejid, resource, status):
_create_win()
if status:
prof.win_show(plugin_win, "fired -> prof_on_contact_offline: " + barejid + "/" + resource + " \"" + status + "\"")
else:
prof.win_show(plugin_win, "fired -> prof_on_contact_offline: " + barejid + "/" + resource)
def prof_on_contact_presence(barejid, resource, presence, status, priority):
_create_win()
if status:
prof.win_show(plugin_win, "fired -> prof_on_contact_presence: " + barejid + "/" + resource + " " + presence + " " + str(priority) + " \"" + status + "\"")
else:
prof.win_show(plugin_win, "fired -> prof_on_contact_presence: " + barejid + "/" + resource + " " + presence + " " + str(priority))