fix emotes if canonical alias is null

This commit is contained in:
Sorunome 2020-05-27 10:33:22 +02:00
parent fabffea1cd
commit f78657957a
No known key found for this signature in database
GPG key ID: B19471D07FC9BE9C

View file

@ -592,7 +592,7 @@ class Room {
final event = room.getState('im.ponies.room_emotes', stateKey);
if (event != null && stateKeyEntry.value is Map) {
addEmotePack(
room.canonicalAlias.isEmpty ? room.id : canonicalAlias,
(room.canonicalAlias?.isEmpty ?? true) ? room.id : canonicalAlias,
event.content,
stateKeyEntry.value['name']);
}