No need to check for the event type in the topic message.

This commit is contained in:
poljar (Damir Jelić) 2018-02-08 13:07:33 +01:00
parent 268111fbfc
commit 51102dd171
2 changed files with 2 additions and 6 deletions

View file

@ -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)

View file

@ -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)