2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-03 23:15:33 +00:00
This commit is contained in:
quadrismegistus 2020-09-12 23:05:06 +01:00
parent 663f2fe35b
commit 01fdae6b8c

View File

@ -48,6 +48,7 @@ class Message(Logger):
if isBase64(self.from_pubkey): self.from_pubkey = b64decode(self.from_pubkey) if isBase64(self.from_pubkey): self.from_pubkey = b64decode(self.from_pubkey)
def __repr__(self): def __repr__(self):
self.log('my type??',type(self.msg),self.msg)
if type(self.msg)==dict: if type(self.msg)==dict:
if is_valid_msg_d(self.msg): if is_valid_msg_d(self.msg):
import textwrap import textwrap
@ -57,7 +58,7 @@ class Message(Logger):
elif type(self.msg)==bytes: elif type(self.msg)==bytes:
msg=b64encode(self.msg).decode() if not isBase64(self.msg) else self.msg.decode() msg=b64encode(self.msg).decode() if not isBase64(self.msg) else self.msg.decode()
else: else:
self.log('my type??',type(self.msg),self.msg)
msg=self.msg msg=self.msg
return f""" return f"""
from: @{self.from_name if self.from_name else ''} from: @{self.from_name if self.from_name else ''}