MUC: Make print_status affect the 333 status code
This commit is contained in:
parent
4f1a3a32c5
commit
b049746418
|
@ -1837,6 +1837,14 @@ class GroupchatControl(ChatControlBase):
|
||||||
simple_jid = app.get_jid_without_resource(obj.real_jid)
|
simple_jid = app.get_jid_without_resource(obj.real_jid)
|
||||||
nick_jid += ' (%s)' % simple_jid
|
nick_jid += ' (%s)' % simple_jid
|
||||||
|
|
||||||
|
con = app.connections[self.account]
|
||||||
|
bookmarks = con.get_module('Bookmarks').bookmarks
|
||||||
|
bookmark = bookmarks.get(self.room_jid, None)
|
||||||
|
if bookmark is None or not bookmark['print_status']:
|
||||||
|
print_status = app.config.get('print_status_in_muc')
|
||||||
|
else:
|
||||||
|
print_status = bookmark['print_status']
|
||||||
|
|
||||||
# status_code
|
# status_code
|
||||||
# http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-\
|
# http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-\
|
||||||
# init
|
# init
|
||||||
|
@ -1884,6 +1892,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
if obj.status_code:
|
if obj.status_code:
|
||||||
if '333' in obj.status_code:
|
if '333' in obj.status_code:
|
||||||
# Handle 333 before 307, some MUCs add both
|
# Handle 333 before 307, some MUCs add both
|
||||||
|
if print_status != 'none':
|
||||||
if obj.nick == self.nick:
|
if obj.nick == self.nick:
|
||||||
s = _('%s kicked us due to an error' % self.room_jid)
|
s = _('%s kicked us due to an error' % self.room_jid)
|
||||||
else:
|
else:
|
||||||
|
@ -2051,13 +2060,6 @@ class GroupchatControl(ChatControlBase):
|
||||||
and (not obj.status_code or '303' not in obj.status_code) and not \
|
and (not obj.status_code or '303' not in obj.status_code) and not \
|
||||||
right_changed:
|
right_changed:
|
||||||
st = ''
|
st = ''
|
||||||
con = app.connections[self.account]
|
|
||||||
bookmarks = con.get_module('Bookmarks').bookmarks
|
|
||||||
bookmark = bookmarks.get(self.room_jid, None)
|
|
||||||
if bookmark is None or not bookmark['print_status']:
|
|
||||||
print_status = app.config.get('print_status_in_muc')
|
|
||||||
else:
|
|
||||||
print_status = bookmark['print_status']
|
|
||||||
|
|
||||||
if obj.show == 'offline':
|
if obj.show == 'offline':
|
||||||
if obj.nick in self.attention_list:
|
if obj.nick in self.attention_list:
|
||||||
|
|
Loading…
Reference in New Issue