diff options
Diffstat (limited to 'model/status.go')
-rw-r--r-- | model/status.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/model/status.go b/model/status.go index 8637f60a3..fec3a5f70 100644 --- a/model/status.go +++ b/model/status.go @@ -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 +} |