[MM-8497] Ability to set Do Not Disturb for a specified period of time (#17680)
* Revert "Revert "[MM-8497] Ability to set Do Not Disturb for a specified period of time (#16067)" (#17657)"
This reverts commit ff383990f8.
* add debug log for recurring function
* add feature flag for dnd timed status
* refactoring changes
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -106,7 +106,11 @@ func updateUserStatus(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
case "away":
|
||||
c.App.SetStatusAwayIfNeeded(c.Params.UserId, true)
|
||||
case "dnd":
|
||||
c.App.SetStatusDoNotDisturb(c.Params.UserId)
|
||||
if c.App.Config().FeatureFlags.TimedDND {
|
||||
c.App.SetStatusDoNotDisturbTimed(c.Params.UserId, status.DNDEndTime)
|
||||
} else {
|
||||
c.App.SetStatusDoNotDisturb(c.Params.UserId)
|
||||
}
|
||||
default:
|
||||
c.SetInvalidParam("status")
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user