No need to check for the event type in the topic message.
This commit is contained in:
parent
268111fbfc
commit
51102dd171
2 changed files with 2 additions and 6 deletions
|
@ -248,10 +248,7 @@ class MatrixMessage:
|
||||||
self.request = server.client.room_send_message(room_id, data)
|
self.request = server.client.room_send_message(room_id, data)
|
||||||
|
|
||||||
elif message_type == MessageType.TOPIC:
|
elif message_type == MessageType.TOPIC:
|
||||||
if extra_id == "m.room.topic":
|
|
||||||
self.request = server.client.room_topic(room_id, data)
|
self.request = server.client.room_topic(room_id, data)
|
||||||
else:
|
|
||||||
assert "Not implemented state event"
|
|
||||||
|
|
||||||
elif message_type == MessageType.REDACT:
|
elif message_type == MessageType.REDACT:
|
||||||
self.request = server.client.room_redact(room_id, extra_id, data)
|
self.request = server.client.room_redact(room_id, extra_id, data)
|
||||||
|
|
|
@ -912,8 +912,7 @@ def matrix_command_topic_cb(data, buffer, command):
|
||||||
OPTIONS,
|
OPTIONS,
|
||||||
MessageType.TOPIC,
|
MessageType.TOPIC,
|
||||||
data=topic,
|
data=topic,
|
||||||
room_id=room_id,
|
room_id=room_id
|
||||||
extra_id="m.room.topic"
|
|
||||||
)
|
)
|
||||||
server.send_or_queue(message)
|
server.send_or_queue(message)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue