plugin XEP-0280: handle CCed messages without "to"
This commit is contained in:
parent
53cc1f1bac
commit
8937201eed
1 changed files with 6 additions and 1 deletions
|
|
@ -144,7 +144,12 @@ class XEP_0280(object):
|
|||
if carbons_elt.name == "received":
|
||||
message_elt["from"] = cc_message_elt["from"]
|
||||
elif carbons_elt.name == "sent":
|
||||
message_elt["to"] = cc_message_elt["to"]
|
||||
try:
|
||||
message_elt["to"] = cc_message_elt["to"]
|
||||
except KeyError:
|
||||
# we may not have "to" in case of message from ourself (from an other
|
||||
# device)
|
||||
pass
|
||||
else:
|
||||
log.warning(
|
||||
"invalid message carbons received:\n{xml}".format(
|
||||
|
|
|
|||
Loading…
Reference in a new issue