Only print normal messages that actually have text

No support for invites/introductions
parent 8ced7b9f
......@@ -65,7 +65,8 @@ def get_message_stdin(token):
def print_message(message):
prefix = '>' if message['local'] else '<'
time = get_timestamp(datetime.fromtimestamp(message['timestamp'] / 1000))
print(f"{time} {prefix} {message['text']}")
if 'text' in message:
print(f"{time} {prefix} {message['text']}")
def get_timestamp(date):
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