[MM-34076] Add Plugin API User custom status (#17435)
* add missing client for custom user status * add custom user status plugin api * update based on feedback review * add GetCustomStatus * update interfaces
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0a3e7f4d55
Коммит
bb5a74a42b
@@ -344,6 +344,18 @@ func (api *PluginAPI) SetUserStatusTimedDND(userID string, endTime int64) (*mode
|
||||
return api.app.GetStatus(userID)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) UpdateUserCustomStatus(userID string, customStatus *model.CustomStatus) *model.AppError {
|
||||
return api.app.SetCustomStatus(userID, customStatus)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) RemoveUserCustomStatus(userID string) *model.AppError {
|
||||
return api.app.RemoveCustomStatus(userID)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetUserCustomStatus(userID string) (*model.CustomStatus, *model.AppError) {
|
||||
return api.app.GetCustomStatus(userID)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetUsersInChannel(channelID, sortBy string, page, perPage int) ([]*model.User, *model.AppError) {
|
||||
switch sortBy {
|
||||
case model.ChannelSortByUsername:
|
||||
|
||||
Ссылка в новой задаче
Block a user