diff src/browser/sat_browser/dialog.py @ 669:a8fddccf5b84 frontends_multi_profiles

server and browser sides: fixes joining room with auto-generated name + leave JID error handling to the backend
author souliane <souliane@mailoo.org>
date Sat, 07 Mar 2015 15:08:56 +0100
parents ebb602d8b3f2
children 9877607c719a
line wrap: on
line diff
--- a/src/browser/sat_browser/dialog.py	Sat Mar 07 13:28:11 2015 +0100
+++ b/src/browser/sat_browser/dialog.py	Sat Mar 07 15:08:56 2015 +0100
@@ -86,13 +86,13 @@
     def room(self):
         """Get the room that has been selected or entered by the user
 
-        @return: jid.JID or None
+        @return: jid.JID or None to let the backend generate a new name
         """
         if self.exist_radio.getChecked():
             values = self.rooms_list.getSelectedValues()
             return jid.JID(values[0]) if values else None
         value = self.box.getText()
-        return None if value == self.GENERATE_MUC else jid.JID(value)
+        return None if value in ('', self.GENERATE_MUC) else jid.JID(value)
 
     def onFocus(self, sender):
         if sender == self.rooms_list:
@@ -138,9 +138,9 @@
         elif nb_contact is not None:
             nb_contact = (nb_contact, nb_contact)
         if nb_contact is None:
-            log.warning("Need to select as many contacts as you want")
+            log.debug("Need to select as many contacts as you want")
         else:
-            log.warning("Need to select between %d and %d contacts" % nb_contact)
+            log.debug("Need to select between %d and %d contacts" % nb_contact)
         self.nb_contact = nb_contact
         self.ok_button = ok_button
         VerticalPanel.__init__(self, Width='100%')