diff --git a/src/common/connection.py b/src/common/connection.py index 58168f7ca95f1bc2ec8e67d34d4835f58edd76d7..dd4947e0258fdd571478e713a2c2b15f7c9914fe 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -395,7 +395,7 @@ class Connection: msgtxt, tim)) elif mtype == 'groupchat': if subject: - self.dispatch('GC_SUBJECT', (frm, subject)) + self.dispatch('GC_SUBJECT', (frm, subject, msgtxt)) else: if not msg.getTag('body'): #no <body> return diff --git a/src/gajim.py b/src/gajim.py index db02212400b7d8d644b84a931d0b5bf484f7a0fd..b53e510879ee308e2b4ee9aaa5a8ec2154d15339 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -765,14 +765,18 @@ class Interface: self.remote_ctrl.raise_signal('GCMessage', (account, array)) def handle_event_gc_subject(self, account, array): - #('GC_SUBJECT', account, (jid, subject)) + #('GC_SUBJECT', account, (jid, subject, body)) jids = array[0].split('/', 1) jid = jids[0] gc_control = gajim.interface.msg_win_mgr.get_control(jid) if not gc_control: return gc_control.set_subject(array[1]) - if len(jids) > 1: + # We can receive a subject with a body that contains "X has set the subject to Y" ... + if array[2]: + gc_control.print_conversation(array[2]) + # ... Or the message comes from the occupant who set the subject + elif len(jids) > 1: gc_control.print_conversation('%s has set the subject to %s' % (jids[1], array[1])) def handle_event_gc_config(self, account, array):