summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-10-24 12:00:42 -0400
committerCorey Hulen <corey@hulen.com>2016-10-24 09:00:42 -0700
commit4834b68ad107c29ada482f6f79c806366574ad40 (patch)
treee6c94b1af115ba6721ace0bddb84da8b6531fc58 /store/sql_user_store.go
parent64f81762cb934b7f3b2cd9e7f7593e2dc78ad9ca (diff)
downloadchat-4834b68ad107c29ada482f6f79c806366574ad40.tar.gz
chat-4834b68ad107c29ada482f6f79c806366574ad40.tar.bz2
chat-4834b68ad107c29ada482f6f79c806366574ad40.zip
Filter out non-team members from invite to channel modal (#4312)
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 8cee9f9d9..7904bdbfe 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -621,6 +621,7 @@ func (us SqlUserStore) GetProfilesNotInChannel(teamId string, channelId string,
INNER JOIN TeamMembers tm
ON tm.UserId = u.Id
AND tm.TeamId = :TeamId
+ AND tm.DeleteAt = 0
LEFT JOIN ChannelMembers cm
ON cm.UserId = u.Id
AND cm.ChannelId = :ChannelId
@@ -1146,6 +1147,7 @@ func (us SqlUserStore) SearchNotInChannel(teamId string, channelId string, term
INNER JOIN TeamMembers tm
ON tm.UserId = u.Id
AND tm.TeamId = :TeamId
+ AND tm.DeleteAt = 0
LEFT JOIN ChannelMembers cm
ON cm.UserId = u.Id
AND cm.ChannelId = :ChannelId