Fix shadowed variables: Part 4 (#10009)

This commit is contained in:
Hanzei
2018-12-18 14:06:53 +01:00
committed by GitHub
parent cebfa38a64
commit b68720360b

View File

@@ -517,24 +517,24 @@ func (a *App) PatchChannel(channel *model.Channel, patch *model.ChannelPatch, us
}
if oldChannelDisplayName != channel.DisplayName {
if err := a.PostUpdateChannelDisplayNameMessage(userId, channel, oldChannelDisplayName, channel.DisplayName); err != nil {
if err = a.PostUpdateChannelDisplayNameMessage(userId, channel, oldChannelDisplayName, channel.DisplayName); err != nil {
mlog.Error(err.Error())
}
}
if channel.Header != oldChannelHeader {
if err := a.PostUpdateChannelHeaderMessage(userId, channel, oldChannelHeader, channel.Header); err != nil {
if err = a.PostUpdateChannelHeaderMessage(userId, channel, oldChannelHeader, channel.Header); err != nil {
mlog.Error(err.Error())
}
}
if channel.Purpose != oldChannelPurpose {
if err := a.PostUpdateChannelPurposeMessage(userId, channel, oldChannelPurpose, channel.Purpose); err != nil {
if err = a.PostUpdateChannelPurposeMessage(userId, channel, oldChannelPurpose, channel.Purpose); err != nil {
mlog.Error(err.Error())
}
}
return channel, err
return channel, nil
}
func (a *App) GetSchemeRolesForChannel(channelId string) (string, string, *model.AppError) {