Simplification of a Channel Members query. (#8345)

Этот коммит содержится в:
George Goldberg
2018-02-28 23:07:09 +00:00
коммит произвёл Joram Wilander
родитель 600528e1cf
Коммит d2b70b8671

Просмотреть файл

@@ -946,9 +946,9 @@ func (s SqlChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId str
var data []allChannelMemberNotifyProps var data []allChannelMemberNotifyProps
_, err := s.GetReplica().Select(&data, ` _, err := s.GetReplica().Select(&data, `
SELECT ChannelMembers.UserId, ChannelMembers.NotifyProps SELECT UserId, NotifyProps
FROM Channels, ChannelMembers FROM ChannelMembers
WHERE Channels.Id = ChannelMembers.ChannelId AND ChannelMembers.ChannelId = :ChannelId`, map[string]interface{}{"ChannelId": channelId}) WHERE ChannelId = :ChannelId`, map[string]interface{}{"ChannelId": channelId})
if err != nil { if err != nil {
result.Err = model.NewAppError("SqlChannelStore.GetAllChannelMembersPropsForChannel", "store.sql_channel.get_members.app_error", nil, "channelId="+channelId+", err="+err.Error(), http.StatusInternalServerError) result.Err = model.NewAppError("SqlChannelStore.GetAllChannelMembersPropsForChannel", "store.sql_channel.get_members.app_error", nil, "channelId="+channelId+", err="+err.Error(), http.StatusInternalServerError)