[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>
This commit is contained in:
darkLord19
2021-06-16 14:38:26 -04:00
committed by GitHub
co-authored by Mattermod
parent 6483abd263
commit b0bdd23d2c
27 changed files with 615 additions and 21 deletions
+7
View File
@@ -266,6 +266,13 @@ func (api *apiTimerLayer) UpdateUserStatus(userID, status string) (*model.Status
return _returnsA, _returnsB
}
func (api *apiTimerLayer) SetUserStatusTimedDND(userId string, endtime int64) (*model.Status, *model.AppError) {
startTime := timePkg.Now()
_returnsA, _returnsB := api.apiImpl.SetUserStatusTimedDND(userId, endtime)
api.recordTime(startTime, "SetUserStatusTimedDND", _returnsB == nil)
return _returnsA, _returnsB
}
func (api *apiTimerLayer) UpdateUserActive(userID string, active bool) *model.AppError {
startTime := timePkg.Now()
_returnsA := api.apiImpl.UpdateUserActive(userID, active)