diff --git a/clientapi/routing/presence.go b/clientapi/routing/presence.go index a9cf26856..92ca9eb67 100644 --- a/clientapi/routing/presence.go +++ b/clientapi/routing/presence.go @@ -41,11 +41,10 @@ var allowedPresence = map[string]bool{ "offline": true, "unavailable": true, } -var allowedStrings []string +var allowedStrings = make([]string, len(allowedPresence)) // we only need to do this once func init() { - allowedStrings = make([]string, len(allowedPresence)) i := 0 for k := range allowedPresence { allowedStrings[i] = k