From c1b8fe97c35ecbca0a51d3a336b118a972688388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 4 Dec 2019 22:44:49 +0100 Subject: [PATCH] buffer: Unknown events nowadays have a source. --- matrix/buffer.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/matrix/buffer.py b/matrix/buffer.py index c0e4c38..793ef15 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -1380,10 +1380,7 @@ class RoomBuffer(object): extra_tags = extra_tags or [] nick = self.find_nick(event.sender) date = server_ts_to_weechat(event.server_timestamp) - data = Render.unknown( - event.type, - event.event_dict.get("content", None) - ) + data = Render.unknown(event.type, event.content) extra_prefix = (self.warning_prefix if event.decrypted and not event.verified else "") @@ -1540,7 +1537,7 @@ class RoomBuffer(object): elif isinstance(event, UnknownBadEvent): self.error("Unkwnown bad event: {}".format( - pprint.pformat(event.event_dict) + pprint.pformat(event.source) )) else: