* Allow user to mark post as unread that was posted by a webhook
* feedback review
(cherry picked from commit 34aef73ac1)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
parent
c77f1dbd6d
commit
e6a1cbb2aa
1 changed files with 6 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ import {observeIsCRTEnabled, observeThreadById} from '@queries/servers/thread';
|
|||
import {observeCurrentUser} from '@queries/servers/user';
|
||||
import {toMilliseconds} from '@utils/datetime';
|
||||
import {isMinimumServerVersion} from '@utils/helpers';
|
||||
import {isSystemMessage} from '@utils/post';
|
||||
import {isFromWebhook, isSystemMessage} from '@utils/post';
|
||||
import {getPostIdsForCombinedUserActivityPost} from '@utils/post_list';
|
||||
import {isSystemAdmin} from '@utils/user';
|
||||
|
||||
|
|
@ -134,7 +134,11 @@ const enhanced = withObservables([], ({combinedPost, post, showAddReaction, loca
|
|||
);
|
||||
|
||||
const canMarkAsUnread = combineLatest([currentUser, channelIsArchived]).pipe(
|
||||
switchMap(([user, isArchived]) => of$(!isArchived && user?.id !== post.userId && !isSystemMessage(post))),
|
||||
switchMap(([user, isArchived]) => of$(
|
||||
!isArchived && (
|
||||
(user?.id !== post.userId && !isSystemMessage(post)) || isFromWebhook(post)
|
||||
),
|
||||
)),
|
||||
);
|
||||
|
||||
const canAddReaction = combineLatest([hasAddReactionPermission, channelIsReadOnly, isUnderMaxAllowedReactions, channelIsArchived]).pipe(
|
||||
|
|
|
|||
Loading…
Reference in a new issue