comparison libervia.tac @ 30:7684e3ceb12d

server_side: added getRoomJoined method
author Goffi <goffi@goffi.org>
date Sat, 14 May 2011 00:56:09 +0200
parents 28e203f13144
children d43d6e4b9dc8
comparison
equal deleted inserted replaced
29:8152f019d334 30:7684e3ceb12d
108 return {} 108 return {}
109 if JID(from_jid).userhost() != _jid.userhost() and JID(to_jid) != _jid.userhost(): 109 if JID(from_jid).userhost() != _jid.userhost() and JID(to_jid) != _jid.userhost():
110 error("Trying to get history from a different jid, maybe a hack attempt ?") 110 error("Trying to get history from a different jid, maybe a hack attempt ?")
111 return {} 111 return {}
112 return self.sat_host.bridge.getHistory(from_jid, to_jid, size) 112 return self.sat_host.bridge.getHistory(from_jid, to_jid, size)
113
114 def jsonrpc_getRoomJoined(self):
115 """Return list of room already joined by user"""
116 profile = self.session.sat_profile
117 return self.sat_host.bridge.getRoomJoined(profile)
113 118
114 def jsonrpc_launchTarotGame(self, other_players): 119 def jsonrpc_launchTarotGame(self, other_players):
115 """Create a room, invite the other players and start a Tarot game""" 120 """Create a room, invite the other players and start a Tarot game"""
116 profile = self.session.sat_profile 121 profile = self.session.sat_profile
117 self.sat_host.bridge.tarotGameLaunch(other_players, profile) 122 self.sat_host.bridge.tarotGameLaunch(other_players, profile)