forked from Ivasoft/mattermost-mobile
Allow user to mark post as unread that was posted by a webhook (#7016)
* Allow user to mark post as unread that was posted by a webhook * feedback review
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user