diff options
author | mathieui <mathieui@mathieui.net> | 2013-05-15 19:03:04 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-05-15 19:04:56 +0200 |
commit | 785b21ff0219406afdc1b401f4522f44629770f9 (patch) | |
tree | d3a15ed8f4e52d0ca345b13e357d8d9eeab5a5d0 /src/core.py | |
parent | 55dfc625b32c60612a3045e2ac5cdaa13219e06e (diff) | |
download | poezio-785b21ff0219406afdc1b401f4522f44629770f9.tar.gz poezio-785b21ff0219406afdc1b401f4522f44629770f9.tar.bz2 poezio-785b21ff0219406afdc1b401f4522f44629770f9.tar.xz poezio-785b21ff0219406afdc1b401f4522f44629770f9.zip |
Fix #2229 (prevent correction if the 2 fulljid differ)
(Except in MUC, where we check the User object for that)
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core.py b/src/core.py index 4c1566bd..dc19038a 100644 --- a/src/core.py +++ b/src/core.py @@ -2717,7 +2717,7 @@ class Core(object): if replaced_id is not '' and (config.get_by_tabname( 'group_corrections', 'true', jid.bare).lower() != 'false'): try: - conversation.modify_message(body, replaced_id, message['id']) + conversation.modify_message(body, replaced_id, message['id'], jid=message['from']) replaced = True except CorrectionError: pass @@ -2726,7 +2726,8 @@ class Core(object): nickname=remote_nick, nick_color=get_theme().COLOR_REMOTE_USER, history=delayed, - identifier=message['id']) + identifier=message['id'], + jid=message['from']) if conversation.remote_wants_chatstates is None and not delayed: if message['chat_state']: conversation.remote_wants_chatstates = True @@ -2925,7 +2926,7 @@ class Core(object): replaced = True except CorrectionError: pass - if not replaced and tab.add_message(body, date, nick_from, history=delayed, identifier=message['id']): + if not replaced and tab.add_message(body, date, nick_from, history=delayed, identifier=message['id'], jid=message['from']): self.events.trigger('highlight', message, tab) if tab is self.current_tab(): @@ -2971,14 +2972,15 @@ class Core(object): if replaced_id is not '' and (config.get_by_tabname( 'group_corrections', 'true', room_from).lower() != 'false'): try: - tab.modify_message(body, replaced_id, message['id'], user=user) + tab.modify_message(body, replaced_id, message['id'], user=user, jid=message['from']) replaced = True except CorrectionError: pass if not replaced: tab.add_message(body, time=None, nickname=nick_from, forced_user=user, - identifier=message['id']) + identifier=message['id'], + jid=message['from']) if tab.remote_wants_chatstates is None: if message['chat_state']: tab.remote_wants_chatstates = True |