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.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
41ddbeb642
Коммит
e83cc7357c
@@ -835,6 +835,14 @@ func (a *App) PatchChannelModerationsForChannel(channel *model.Channel, channelM
|
|||||||
return nil, err
|
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)
|
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_SCHEME_UPDATED, "", channel.Id, "", nil)
|
||||||
a.Publish(message)
|
a.Publish(message)
|
||||||
mlog.Info("Permission scheme created.", mlog.String("channel_id", channel.Id), mlog.String("channel_name", channel.Name))
|
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 {
|
func (c *Client4) GetBleveRoute() string {
|
||||||
return fmt.Sprintf("/bleve")
|
return "/bleve"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client4) GetCommandsRoute() string {
|
func (c *Client4) GetCommandsRoute() string {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user