Mercurial > libervia-web
diff src/browser/sat_browser/game_radiocol.py @ 686:90a5a5af2550
browser_side: let the backend check for the validity of MUC JIDs that come from a user input
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 27 Mar 2015 00:15:42 +0100 |
parents | 9877607c719a |
children | 7a9c7b9f6a28 |
line wrap: on
line diff
--- a/src/browser/sat_browser/game_radiocol.py Mon Mar 30 10:28:47 2015 +0200 +++ b/src/browser/sat_browser/game_radiocol.py Fri Mar 27 00:15:42 2015 +0100 @@ -22,7 +22,6 @@ log = getLogger(__name__) from sat.core.i18n import _, D_ -from sat_frontends.tools.misc import DEFAULT_MUC from sat_frontends.tools import host_listener from constants import Const as C @@ -258,7 +257,7 @@ help_msg = """Accepted file formats: Ogg Vorbis (recommended), MP3.<br /> Please do not submit files that are protected by copyright.<br /> Click <a style="color: red;">here</a> if you need some support :)""" - link_cb = lambda: self._parent.host.bridge.call('joinMUC', None, DEFAULT_MUC, self._parent.nick) + link_cb = lambda: self._parent.host.bridge.joinMUC(C.DEFAULT_MUC, self._parent.nick, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=self.host.showFailureRoomInvalid) self._parent.printInfo(help_msg, type_='link', link_cb=link_cb) def pushNextSong(self, title): @@ -334,7 +333,7 @@ def callback(room_jid, contacts): contacts = [unicode(contact) for contact in contacts] room_jid_s = unicode(room_jid) if room_jid else '' - host.bridge.launchRadioCollective(contacts, room_jid_s, profile=C.PROF_KEY_NONE) + host.bridge.launchRadioCollective(contacts, room_jid_s, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=host.showFailureRoomInvalid) dialog.RoomAndContactsChooser(host, callback, ok_button="Choose", title="Collective Radio", visible=(False, True))