Mercurial > libervia-web
comparison 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 |
comparison
equal
deleted
inserted
replaced
278:4517978a2e7e | 279:2d6bd975a72d |
---|---|
215 def jsonrpc_getWaitingSub(self): | 215 def jsonrpc_getWaitingSub(self): |
216 """Return list of room already joined by user""" | 216 """Return list of room already joined by user""" |
217 profile = ISATSession(self.session).profile | 217 profile = ISATSession(self.session).profile |
218 return self.sat_host.bridge.getWaitingSub(profile) | 218 return self.sat_host.bridge.getWaitingSub(profile) |
219 | 219 |
220 def jsonrpc_setStatus(self, status): | 220 def jsonrpc_setStatus(self, presence, status): |
221 """Change the status""" | 221 """Change the presence and/or status |
222 profile = ISATSession(self.session).profile | 222 @param presence: value from ("", "chat", "away", "dnd", "xa") |
223 self.sat_host.bridge.setPresence('', '', 0, {'':status}, profile) | 223 @param status: any string to describe your status |
224 """ | |
225 profile = ISATSession(self.session).profile | |
226 self.sat_host.bridge.setPresence('', presence, 0, {'': status}, profile) | |
224 | 227 |
225 | 228 |
226 def jsonrpc_sendMessage(self, to_jid, msg, subject, _type, options={}): | 229 def jsonrpc_sendMessage(self, to_jid, msg, subject, _type, options={}): |
227 """send message""" | 230 """send message""" |
228 profile = ISATSession(self.session).profile | 231 profile = ISATSession(self.session).profile |