diff libervia.tac @ 279:2d6bd975a72d

browser_side: set your own presence status and display those of others
author souliane <souliane@mailoo.org>
date Sat, 23 Nov 2013 14:46:03 +0100
parents ea2d4f464b5a
children ae3ec654836d
line wrap: on
line diff
--- a/libervia.tac	Fri Nov 22 21:43:08 2013 +0100
+++ b/libervia.tac	Sat Nov 23 14:46:03 2013 +0100
@@ -217,10 +217,13 @@
         profile = ISATSession(self.session).profile
         return self.sat_host.bridge.getWaitingSub(profile)
 
-    def jsonrpc_setStatus(self, status):
-        """Change the status"""
+    def jsonrpc_setStatus(self, presence, status):
+        """Change the presence and/or status
+        @param presence: value from ("", "chat", "away", "dnd", "xa")
+        @param status: any string to describe your status
+        """
         profile = ISATSession(self.session).profile
-        self.sat_host.bridge.setPresence('', '', 0, {'':status}, profile)
+        self.sat_host.bridge.setPresence('', presence, 0, {'': status}, profile)
 
 
     def jsonrpc_sendMessage(self, to_jid, msg, subject, _type, options={}):