fix blank message detection

This commit is contained in:
git-bruh 2021-04-26 13:35:01 +05:30
parent 6b20650503
commit b9e5409300
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -13,7 +13,7 @@ class Event(object):
self.attachment = content.get("url") self.attachment = content.get("url")
self.author = event["author"] self.author = event["author"]
self.body = content.get("body", "") self.body = content.get("body", "").strip()
self.event_id = event["event_id"] self.event_id = event["event_id"]
self.is_direct = content.get("is_direct", False) self.is_direct = content.get("is_direct", False)
self.room_id = event["room_id"] self.room_id = event["room_id"]