4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 12:19:23 +00:00

Sync with mattermost 3.6.0

This commit is contained in:
Wim
2017-01-16 23:59:50 +01:00
parent 9987ac3f13
commit 93114b7682
26 changed files with 710 additions and 91 deletions

View File

@ -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
}