mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-01-11 23:29:31 -05:00
Added transport encryption indicators to messages
This commit is contained in:
parent
ab27f17ea9
commit
9a0c4ea6a8
@ -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()
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user