Use status cache for checking @here notifications (#5035)

Этот коммит содержится в:
Joram Wilander
2017-01-10 11:38:03 -05:00
коммит произвёл Harrison Healey
родитель 056be669fc
Коммит 4101b28de5
3 изменённых файлов: 48 добавлений и 40 удалений

Просмотреть файл

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