Simplification of a Channel Members query. (#8345)
Этот коммит содержится в:
коммит произвёл
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)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user