Commit e8eb3e3d authored by Philipp Hörist's avatar Philipp Hörist

Remove sent attribute from decrypted-message event

It's available via properties attribute
parent caf48a40
......@@ -817,7 +817,7 @@ def _nec_decrypted_message_received(self, obj):
return
typ = ''
if obj.forwarded and obj.sent:
if obj.properties.is_sent_carbon:
typ = 'out'
self.add_message(obj.msgtxt,
......
......@@ -325,7 +325,7 @@ def detect_type(self):
def handle_incoming_msg_event(self, msg_obj):
# don't alert for carbon copied messages from ourselves
if msg_obj.sent:
if msg_obj.properties.is_sent_carbon:
return
if not msg_obj.msgtxt:
return
......
......@@ -179,7 +179,6 @@ def _message_received(self, _con, stanza, properties):
'account': self._account,
'additional_data': additional_data,
'forwarded': properties.is_carbon_message,
'sent': properties.is_carbon_message and properties.carbon.is_sent,
'fjid': fjid,
'jid': jid,
'resource': resource,
......
......@@ -95,7 +95,6 @@ def _messageCB(self, con, stanza, properties):
'account': self.name,
'additional_data': additional_data,
'forwarded': False,
'sent': False,
'timestamp': time.time(),
'fjid': fjid,
'jid': jid,
......
......@@ -1093,7 +1093,7 @@ def _nec_decrypted_message_received(self, obj):
if obj.session.control:
# print if a control is open
frm = ''
if obj.sent:
if obj.properties.is_sent_carbon:
frm = 'out'
obj.session.control.add_message(
obj.msgtxt,
......@@ -1106,7 +1106,7 @@ def _nec_decrypted_message_received(self, obj):
else:
# otherwise pass it off to the control to be queued
self.on_private_message(nick,
obj.sent,
obj.properties.is_sent_carbon,
obj.msgtxt,
obj.properties.timestamp,
obj.xhtml,
......
......@@ -103,7 +103,7 @@ def _nec_decrypted_message_received(self, obj):
return
log_type = KindConstant.CHAT_MSG_RECV
if obj.forwarded and obj.sent:
if obj.properties.is_sent_carbon:
log_type = KindConstant.CHAT_MSG_SENT
if self.is_loggable() and obj.msgtxt:
......@@ -209,7 +209,7 @@ def roster_message2(self, obj):
obj.show_in_roster = False
obj.show_in_systray = False
do_event = False
elif obj.forwarded and obj.sent:
elif obj.properties.is_sent_carbon:
# Its a Carbon Copied Message we sent
obj.show_in_roster = False
obj.show_in_systray = False
......@@ -240,7 +240,7 @@ def roster_message2(self, obj):
xhtml=obj.xhtml,
session=self,
displaymarking=obj.displaymarking,
sent_forwarded=obj.forwarded and obj.sent,
sent_forwarded=obj.properties.is_sent_carbon,
show_in_roster=obj.show_in_roster,
show_in_systray=obj.show_in_systray,
additional_data=obj.additional_data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment