Mark onboarding story read again, even if it's not unread

This commit is contained in:
Scott Nonnenberg 2023-11-10 13:59:16 -08:00 committed by GitHub
parent 5c62fa0a14
commit 61b4558140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -380,13 +380,6 @@ function markStoryRead(
return;
}
if (matchingStory.readStatus !== ReadStatus.Unread) {
log.warn(
`markStoryRead: not unread, ${messageId} read status: ${matchingStory.readStatus}`
);
return;
}
const message = await __DEPRECATED$getMessageById(messageId);
if (!message) {
@ -416,6 +409,13 @@ function markStoryRead(
);
}
if (matchingStory.readStatus !== ReadStatus.Unread) {
log.warn(
`markStoryRead: not unread, ${messageId} read status: ${matchingStory.readStatus}`
);
return;
}
const storyReadDate = Date.now();
message.set(markViewed(message.attributes, storyReadDate));