print the error when we try to configure a room and we don't have permission
This commit is contained in:
parent
5d88dcbf11
commit
581b387bd9
|
@ -467,6 +467,13 @@ class Connection:
|
|||
i += 1
|
||||
self.dispatch('GC_CONFIG', (str(iq_obj.getFrom()), dic))
|
||||
|
||||
def _MucErrorCB(self, con, iq_obj):
|
||||
gajim.log.debug('MucErrorCB')
|
||||
jid = str(iq_obj.getFrom())
|
||||
errmsg = iq_obj.getError()
|
||||
errcode = iq_obj.getErrorCode()
|
||||
self.dispatch('MSGERROR', (jid, errcode, errmsg))
|
||||
|
||||
def connect(self):
|
||||
"""Connect and authentificate to the Jabber server"""
|
||||
name = gajim.config.get_per('accounts', self.name, 'name')
|
||||
|
@ -513,6 +520,8 @@ class Connection:
|
|||
common.jabber.NS_VERSION)
|
||||
con.registerHandler('iq',self._MucOwnerCB,'result', \
|
||||
common.jabber.NS_P_MUC_OWNER)
|
||||
con.registerHandler('iq',self._MucErrorCB,'error',\
|
||||
common.jabber.NS_P_MUC_OWNER)
|
||||
try:
|
||||
con.connect()
|
||||
except:
|
||||
|
|
|
@ -298,12 +298,12 @@ class Interface:
|
|||
self.play_sound('next_message_received')
|
||||
|
||||
def handle_event_msgerror(self, account, array):
|
||||
#('MSGERROR', account, (user, error_code, error_msg, msg, time))
|
||||
#('MSGERROR', account, (jid, error_code, error_msg, msg, time))
|
||||
jid = array[0].split('/')[0]
|
||||
if jid in self.windows[account]['gc']:
|
||||
self.windows[account]['gc'][jid].print_conversation('Error %s: %s' % \
|
||||
(array[1], array[2]), jid, tim = array[4])
|
||||
if self.windows[account]['gc'][jid].get_active() == jid:
|
||||
(array[1], array[2]), jid)
|
||||
if self.windows[account]['gc'][jid].get_active_jid() == jid:
|
||||
self.windows[account]['gc'][jid].set_subject(jid, \
|
||||
self.windows[account]['gc'][jid].subjects[jid])
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue