[Event] user null check

This commit is contained in:
Christian Pauly 2019-08-28 12:16:18 +02:00
parent e5d4c6be73
commit eb2e30d730
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class RawEvent {
/// The user who has sent this event if it is not a global account data event.
final String senderId;
User get sender => room.states[senderId].asUser ?? User(senderId);
User get sender => room.states[senderId]?.asUser ?? User(senderId);
/// The time this event has received at the server. May be null for events like
/// account data.