MM-24517: Add newly created channel admin role to all clients' redux state. (#14635)

* MM-24517: Add newly created channel admin role to redux state.

* MM-24517: Adds comment; fixes lint errors.
Этот коммит содержится в:
Martin Kraft
2020-05-28 14:38:27 -04:00
коммит произвёл GitHub
родитель 41ddbeb642
Коммит e83cc7357c
2 изменённых файлов: 9 добавлений и 1 удалений

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

@@ -835,6 +835,14 @@ func (a *App) PatchChannelModerationsForChannel(channel *model.Channel, channelM
return nil, err
}
// Send a websocket event about this new role. The other new roles—member and guest—get emitted when they're updated.
var adminRole *model.Role
adminRole, err = a.GetRoleByName(scheme.DefaultChannelAdminRole)
if err != nil {
return nil, err
}
a.sendUpdatedRoleEvent(adminRole)
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_SCHEME_UPDATED, "", channel.Id, "", nil)
a.Publish(message)
mlog.Info("Permission scheme created.", mlog.String("channel_id", channel.Id), mlog.String("channel_name", channel.Name))

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

@@ -388,7 +388,7 @@ func (c *Client4) GetElasticsearchRoute() string {
}
func (c *Client4) GetBleveRoute() string {
return fmt.Sprintf("/bleve")
return "/bleve"
}
func (c *Client4) GetCommandsRoute() string {