Commit 5fad8a2d authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed storing 'right' display name in history

parent d1297740
...@@ -317,6 +317,9 @@ class MessageHistory(object, metaclass=Singleton): ...@@ -317,6 +317,9 @@ class MessageHistory(object, metaclass=Singleton):
if match: if match:
remote_uri = match.group('number') remote_uri = match.group('number')
if direction == 'outgoing':
display_name = message.sender.display_name
else:
try: try:
contact = next(contact for contact in AddressbookManager().get_contacts() if remote_uri in (addr.uri for addr in contact.uris)) contact = next(contact for contact in AddressbookManager().get_contacts() if remote_uri in (addr.uri for addr in contact.uris))
except StopIteration: except StopIteration:
......
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