mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
client: Don't check for the room id until we know it's a valid event.
This commit is contained in:
parent
0a1008a127
commit
3e67010278
@ -164,14 +164,14 @@ class PanClient(AsyncClient):
|
||||
# type: (Dict[Any, Any], Optional[str]) -> ()
|
||||
event = RoomEncryptedEvent.parse_event(event_dict)
|
||||
|
||||
if not event.room_id:
|
||||
event.room_id = room_id
|
||||
|
||||
if not isinstance(event, MegolmEvent):
|
||||
logger.warn("Encrypted event is not a megolm event:"
|
||||
"\n{}".format(pformat(event_dict)))
|
||||
return None
|
||||
|
||||
if not event.room_id:
|
||||
event.room_id = room_id
|
||||
|
||||
try:
|
||||
decrypted_event = self.decrypt_event(event)
|
||||
logger.info("Decrypted event: {}".format(decrypted_event))
|
||||
|
Loading…
Reference in New Issue
Block a user