summaryrefslogtreecommitdiffstats
path: root/model/status.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-09-02 12:50:15 -0400
committerGitHub <noreply@github.com>2016-09-02 12:50:15 -0400
commitf32eb525f3fa0828a23f589d765c267e3b2aea86 (patch)
treed4b76aecf89143029af080b3e1b4d87398e0adc5 /model/status.go
parenteb0111f6bbe2b0bf160a674dfe1b4d089f905cb9 (diff)
downloadchat-f32eb525f3fa0828a23f589d765c267e3b2aea86.tar.gz
chat-f32eb525f3fa0828a23f589d765c267e3b2aea86.tar.bz2
chat-f32eb525f3fa0828a23f589d765c267e3b2aea86.zip
Do not send push notifications for channels being actively viewed (#3931)
Diffstat (limited to 'model/status.go')
-rw-r--r--model/status.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/model/status.go b/model/status.go
index 477b750d5..f4ad8e775 100644
--- a/model/status.go
+++ b/model/status.go
@@ -9,10 +9,11 @@ import (
)
const (
- STATUS_OFFLINE = "offline"
- STATUS_AWAY = "away"
- STATUS_ONLINE = "online"
- STATUS_CACHE_SIZE = 10000
+ STATUS_OFFLINE = "offline"
+ STATUS_AWAY = "away"
+ STATUS_ONLINE = "online"
+ STATUS_CACHE_SIZE = 10000
+ STATUS_CHANNEL_TIMEOUT = 20000 // 20 seconds
)
type Status struct {
@@ -20,6 +21,7 @@ type Status struct {
Status string `json:"status"`
Manual bool `json:"manual"`
LastActivityAt int64 `json:"last_activity_at"`
+ ActiveChannel string `json:"active_channel"`
}
func (o *Status) ToJson() string {