summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/status.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-01-16 23:59:50 +0100
committerWim <wim@42.be>2017-01-17 00:00:26 +0100
commit93114b76828357644afb22f7359c0ba185719478 (patch)
treeaaaf5f855256b3750ee6e5b0c082a5bca0f0dd20 /vendor/github.com/mattermost/platform/model/status.go
parent9987ac3f13671bf6c4e1530544afa865035b0efd (diff)
downloadmatterbridge-msglm-93114b76828357644afb22f7359c0ba185719478.tar.gz
matterbridge-msglm-93114b76828357644afb22f7359c0ba185719478.tar.bz2
matterbridge-msglm-93114b76828357644afb22f7359c0ba185719478.zip
Sync with mattermost 3.6.0
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/status.go')
-rw-r--r--vendor/github.com/mattermost/platform/model/status.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/vendor/github.com/mattermost/platform/model/status.go b/vendor/github.com/mattermost/platform/model/status.go
index 32486642..fec3a5f7 100644
--- a/vendor/github.com/mattermost/platform/model/status.go
+++ b/vendor/github.com/mattermost/platform/model/status.go
@@ -22,7 +22,7 @@ type Status struct {
Status string `json:"status"`
Manual bool `json:"manual"`
LastActivityAt int64 `json:"last_activity_at"`
- ActiveChannel string `json:"active_channel"`
+ ActiveChannel string `json:"active_channel" db:"-"`
}
func (o *Status) ToJson() string {
@@ -44,3 +44,14 @@ func StatusFromJson(data io.Reader) *Status {
return nil
}
}
+
+func StatusMapToInterfaceMap(statusMap map[string]*Status) map[string]interface{} {
+ interfaceMap := map[string]interface{}{}
+ for _, s := range statusMap {
+ // Omitted statues mean offline
+ if s.Status != STATUS_OFFLINE {
+ interfaceMap[s.UserId] = s.Status
+ }
+ }
+ return interfaceMap
+}