summaryrefslogtreecommitdiffstats
path: root/app/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/status.go')
-rw-r--r--app/status.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/app/status.go b/app/status.go
index bef17165f..51e7d1ed8 100644
--- a/app/status.go
+++ b/app/status.go
@@ -235,21 +235,3 @@ func GetStatus(userId string) (*model.Status, *model.AppError) {
func IsUserAway(lastActivityAt int64) bool {
return model.GetMillis()-lastActivityAt >= *utils.Cfg.TeamSettings.UserStatusAwayTimeout*1000
}
-
-func DoesStatusAllowPushNotification(user *model.User, status *model.Status, channelId string) bool {
- props := user.NotifyProps
-
- if props["push"] == "none" {
- return false
- }
-
- if pushStatus, ok := props["push_status"]; (pushStatus == model.STATUS_ONLINE || !ok) && (status.ActiveChannel != channelId || model.GetMillis()-status.LastActivityAt > model.STATUS_CHANNEL_TIMEOUT) {
- return true
- } else if pushStatus == model.STATUS_AWAY && (status.Status == model.STATUS_AWAY || status.Status == model.STATUS_OFFLINE) {
- return true
- } else if pushStatus == model.STATUS_OFFLINE && status.Status == model.STATUS_OFFLINE {
- return true
- }
-
- return false
-}