[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
@@ -621,6 +621,15 @@ func (u *User) SetCustomStatus(cs *CustomStatus) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *User) GetCustomStatus() *CustomStatus {
|
||||
var o *CustomStatus
|
||||
|
||||
data := u.Props[UserPropsKeyCustomStatus]
|
||||
_ = json.Unmarshal([]byte(data), &o)
|
||||
|
||||
return o
|
||||
}
|
||||
|
||||
func (u *User) ClearCustomStatus() {
|
||||
u.MakeNonNil()
|
||||
u.Props[UserPropsKeyCustomStatus] = ""
|
||||
|
||||
Ссылка в новой задаче
Block a user