diff --git a/nomadnet/Conversation.py b/nomadnet/Conversation.py index 5757f65..e2e9710 100644 --- a/nomadnet/Conversation.py +++ b/nomadnet/Conversation.py @@ -229,6 +229,18 @@ class ConversationMessage: return self.lxm.state + def get_transport_encryption(self): + if not self.loaded: + self.load() + + return self.lxm.transport_encryption + + def get_transport_encrypted(self): + if not self.loaded: + self.load() + + return self.lxm.transport_encrypted + def signature_validated(self): if not self.loaded: self.load() diff --git a/nomadnet/ui/textui/Conversations.py b/nomadnet/ui/textui/Conversations.py index 6f91215..579c3fa 100644 --- a/nomadnet/ui/textui/Conversations.py +++ b/nomadnet/ui/textui/Conversations.py @@ -567,7 +567,13 @@ class LXMessageWidget(urwid.WidgetWrap): self.timestamp = message.get_timestamp() time_format = app.time_format message_time = datetime.fromtimestamp(self.timestamp) - title_string = message_time.strftime(time_format) + encryption_string = "" + if message.get_transport_encrypted(): + encryption_string = " [\U0001F512"+message.get_transport_encryption()+"]" + else: + encryption_string = " [\U0001F513"+message.get_transport_encryption()+"]" + + title_string = message_time.strftime(time_format)+encryption_string if app.lxmf_destination.hash == message.lxm.source_hash: if message.lxm.state == LXMF.LXMessage.DELIVERED: