Merge branch 'event-fix-null-sender' into 'master'

[Event] Fix null sender

See merge request famedly/famedlysdk!188
This commit is contained in:
Christian Pauly 2020-02-14 14:10:45 +00:00
commit a43f659a48

View file

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