show subject in notification popups. Fixes #2217
This commit is contained in:
parent
285f190a28
commit
87e46f49f1
1 changed files with 6 additions and 2 deletions
|
@ -491,6 +491,7 @@ class Interface:
|
||||||
|
|
||||||
message = array[1]
|
message = array[1]
|
||||||
msg_type = array[4]
|
msg_type = array[4]
|
||||||
|
subject = array[5]
|
||||||
chatstate = array[6]
|
chatstate = array[6]
|
||||||
msg_id = array[7]
|
msg_id = array[7]
|
||||||
composing_jep = array[8]
|
composing_jep = array[8]
|
||||||
|
@ -570,11 +571,14 @@ class Interface:
|
||||||
else:
|
else:
|
||||||
# array: (jid, msg, time, encrypted, msg_type, subject)
|
# array: (jid, msg, time, encrypted, msg_type, subject)
|
||||||
self.roster.on_message(jid, message, array[2], account, array[3],
|
self.roster.on_message(jid, message, array[2], account, array[3],
|
||||||
msg_type, array[5], resource, msg_id, array[9])
|
msg_type, subject, resource, msg_id, array[9])
|
||||||
nickname = gajim.get_name_from_jid(account, jid)
|
nickname = gajim.get_name_from_jid(account, jid)
|
||||||
# Check and do wanted notifications
|
# Check and do wanted notifications
|
||||||
|
msg = message
|
||||||
|
if subject:
|
||||||
|
msg = _('Subject: %s') % subject + '\n' + msg
|
||||||
notify.notify('new_message', jid, account, [msg_type, first, nickname,
|
notify.notify('new_message', jid, account, [msg_type, first, nickname,
|
||||||
message])
|
msg])
|
||||||
|
|
||||||
if self.remote_ctrl:
|
if self.remote_ctrl:
|
||||||
self.remote_ctrl.raise_signal('NewMessage', (account, array))
|
self.remote_ctrl.raise_signal('NewMessage', (account, array))
|
||||||
|
|
Loading…
Add table
Reference in a new issue