From d2b70b8671bd267e4b955e3da2ee0670daba5f2c Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Wed, 28 Feb 2018 23:07:09 +0000 Subject: Simplification of a Channel Members query. (#8345) --- store/sqlstore/channel_store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'store/sqlstore/channel_store.go') 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) -- cgit v1.2.3-1-g7c22