summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/status.go
diff options
context:
space:
mode:
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
+}