Mark as unread only if following the thread (#6421)

This commit is contained in:
Anurag Shivarathri 2022-06-22 23:49:17 +05:30 committed by GitHub
parent 12e97e49a8
commit b5ff344b64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ export const fetchAndSwitchToThread = async (serverUrl: string, rootId: string,
const post = await getPostById(database, rootId);
if (post) {
const thread = await getThreadById(database, rootId);
if (thread) {
if (thread?.isFollowing) {
const channel = await getChannelById(database, post.channelId);
if (channel) {
markThreadAsRead(serverUrl, channel.teamId, thread.id);