also update room list when encrypted events come in

This commit is contained in:
Bruno Windels 2020-09-14 14:01:47 +02:00
parent fb69688d47
commit 0c3ea90ab4

View file

@ -92,11 +92,9 @@ function processStateEvent(data, event) {
function processTimelineEvent(data, eventEntry, isInitialSync, isTimelineOpen, ownUserId) {
if (eventEntry.eventType === "m.room.message") {
console.log("new message", eventEntry.timestamp, eventEntry.content?.body);
data = data.cloneIfNeeded();
data.lastMessageTimestamp = eventEntry.timestamp;
if (!isInitialSync && eventEntry.sender !== ownUserId && !isTimelineOpen) {
console.log("also marking unread");
data.isUnread = true;
}
const {content} = eventEntry;