[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
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2021-11-10 17:11:20 +01:00
коммит произвёл GitHub
родитель 0a3e7f4d55
Коммит bb5a74a42b
13 изменённых файлов: 290 добавлений и 4 удалений

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

@@ -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: