summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/channel_store.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-02-28 23:07:09 +0000
committerJoram Wilander <jwawilander@gmail.com>2018-02-28 23:07:09 +0000
commitd2b70b8671bd267e4b955e3da2ee0670daba5f2c (patch)
treee879e55fb54926b595fb7ea554e6049aa774fc3a /store/sqlstore/channel_store.go
parent600528e1cfb06978efe6ce325fe2e2e4bb964f78 (diff)
downloadchat-d2b70b8671bd267e4b955e3da2ee0670daba5f2c.tar.gz
chat-d2b70b8671bd267e4b955e3da2ee0670daba5f2c.tar.bz2
chat-d2b70b8671bd267e4b955e3da2ee0670daba5f2c.zip
Simplification of a Channel Members query. (#8345)
Diffstat (limited to 'store/sqlstore/channel_store.go')
-rw-r--r--store/sqlstore/channel_store.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go
index 75a615aee..131e5649b 100644
--- a/store/sqlstore/channel_store.go
+++ b/store/sqlstore/channel_store.go
@@ -946,9 +946,9 @@ func (s SqlChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId str
var data []allChannelMemberNotifyProps
_, err := s.GetReplica().Select(&data, `
- SELECT ChannelMembers.UserId, ChannelMembers.NotifyProps
- FROM Channels, ChannelMembers
- WHERE Channels.Id = ChannelMembers.ChannelId AND ChannelMembers.ChannelId = :ChannelId`, map[string]interface{}{"ChannelId": channelId})
+ SELECT UserId, NotifyProps
+ FROM ChannelMembers
+ WHERE ChannelId = :ChannelId`, map[string]interface{}{"ChannelId": channelId})
if err != nil {
result.Err = model.NewAppError("SqlChannelStore.GetAllChannelMembersPropsForChannel", "store.sql_channel.get_members.app_error", nil, "channelId="+channelId+", err="+err.Error(), http.StatusInternalServerError)