EventIndex: Live events can be unencrypted as well.

pull/21833/head
Damir Jelić 2020-01-15 10:41:33 +01:00
parent d30c46a641
commit 4f63b10465
1 changed files with 6 additions and 1 deletions

View File

@ -170,7 +170,12 @@ export default class EventIndex {
return;
}
const e = ev.toJSON().decrypted;
const jsonEvent = ev.toJSON();
let e;
if (ev.isEncrypted()) e = jsonEvent.decrypted;
else e = jsonEvent;
const profile = {
displayname: ev.sender.rawDisplayName,
avatar_url: ev.sender.getMxcAvatarUrl(),