make last message correction work for carbon copied messages sent from another resource. Fixes #8276

This commit is contained in:
Yann Leboulanger 2016-03-05 14:22:56 +01:00
parent 766ae0353e
commit f405228041
2 changed files with 8 additions and 0 deletions

View File

@ -870,6 +870,13 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
correct_id[1] == self.last_received_id[name]:
self.conv_textview.correct_last_received_message(text, xhtml,
name, old_txt)
elif correct_id and correct_id[1] and \
self.conv_textview.last_sent_message_marks[0] and \
correct_id[1] == self.last_received_id[name]:
# this is for carbon copied messages that are sent from another
# resource
self.conv_textview.correct_last_sent_message(text, xhtml,
self.get_our_nick(), old_txt)
else:
textview.print_conversation_line(text, jid, kind, name, tim,
other_tags_for_name, other_tags_for_time, other_tags_for_text,

View File

@ -1150,6 +1150,7 @@ class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
if forward_tag:
msg = forward_tag.getTag('message')
self.stanza = nbxmpp.Message(node=msg)
self.get_id()
if carbon_marker.getName() == 'sent':
to = self.stanza.getTo()
frm = self.stanza.getFrom()