fix receiving a carbon of a sent message without a from.

This commit is contained in:
Yann Leboulanger 2013-07-18 14:32:45 +02:00
parent a496c8004d
commit 975bf972eb
1 changed files with 4 additions and 1 deletions

View File

@ -1054,7 +1054,10 @@ class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
self.stanza = nbxmpp.Message(node=msg)
if carbon_marker.getName() == 'sent':
to = self.stanza.getTo()
self.stanza.setTo(self.stanza.getFrom())
frm = self.stanza.getFrom()
if not frm:
frm = gajim.get_jid_from_account(account)
self.stanza.setTo(frm)
self.stanza.setFrom(to)
self.sent = True
try: