From 0000f1d00fb6283ee87624c5b91e7ea4ab37206b Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Thu, 23 Nov 2023 19:59:25 +0530 Subject: [PATCH] MM-55710: Remove join with channel in GetFlaggedPosts (#25513) https://mattermost.atlassian.net/browse/MM-55710 ```release-note NONE ``` --- server/channels/store/sqlstore/post_store.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/channels/store/sqlstore/post_store.go b/server/channels/store/sqlstore/post_store.go index 24cd8838ecf70..0c7f6ca0e822a 100644 --- a/server/channels/store/sqlstore/post_store.go +++ b/server/channels/store/sqlstore/post_store.go @@ -505,13 +505,10 @@ func (s *SqlPostStore) getFlaggedPosts(userId, channelId, teamId string, offset WHERE ChannelId IN ( SELECT - Id + ChannelId FROM - Channels, ChannelMembers - WHERE - Id = ChannelId - AND UserId = ? + WHERE UserId = ? ) TEAM_FILTER ORDER BY CreateAt DESC