diff --git a/src/dialogs.py b/src/dialogs.py index 81f71cd6b..8ab4bae57 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -933,7 +933,7 @@ class SingleMessageWindow: '''SingleMessageWindow can send or show a received singled message depending on action argument''' def __init__(self, account, to = '', action = '', from_whom = '', - subject = '', message = ''): + subject = '', message = '', resource = ''): self.account = account self.action = action @@ -974,7 +974,10 @@ class SingleMessageWindow: self.subject_entry.grab_focus() elif self.action == 'receive': self.from_whom = from_whom - self.from_entry.set_text(self.from_whom) + fjid = from_whom # Full jid of sender (with resource) + if resource: + fjid += resource + self.from_entry.set_text(fjid) self.from_entry.set_property('editable', False) self.subject_entry.set_property('editable', False) self.message_textview.set_editable(False) diff --git a/src/roster_window.py b/src/roster_window.py index b25346bc6..db4178c19 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1701,7 +1701,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid) jid) dialogs.SingleMessageWindow(account, contact.jid, action = 'receive', from_whom = jid, subject = subject, - message = msg) + message = msg, resource = resource) return # We print if window is opened and it's not a single message @@ -1942,7 +1942,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid) if typ == 'normal': dialogs.SingleMessageWindow(account, jid, action = 'receive', from_whom = jid, subject = data[1], - message = data[0]) + message = data[0], resource = data[5]) gajim.interface.remove_first_event(account, jid, typ) return True elif typ == 'file-request':