From 51102dd1718ddb5b032785b49e114566beafde38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Thu, 8 Feb 2018 13:07:33 +0100 Subject: [PATCH] No need to check for the event type in the topic message. --- matrix/api.py | 5 +---- matrix/commands.py | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/matrix/api.py b/matrix/api.py index 904853a..f0d83d5 100644 --- a/matrix/api.py +++ b/matrix/api.py @@ -248,10 +248,7 @@ class MatrixMessage: self.request = server.client.room_send_message(room_id, data) elif message_type == MessageType.TOPIC: - if extra_id == "m.room.topic": - self.request = server.client.room_topic(room_id, data) - else: - assert "Not implemented state event" + self.request = server.client.room_topic(room_id, data) elif message_type == MessageType.REDACT: self.request = server.client.room_redact(room_id, extra_id, data) diff --git a/matrix/commands.py b/matrix/commands.py index 25d7a7d..aa54ad1 100644 --- a/matrix/commands.py +++ b/matrix/commands.py @@ -912,8 +912,7 @@ def matrix_command_topic_cb(data, buffer, command): OPTIONS, MessageType.TOPIC, data=topic, - room_id=room_id, - extra_id="m.room.topic" + room_id=room_id ) server.send_or_queue(message)