diff --git a/pkg/geoip/geoip.go b/pkg/geoip/geoip.go index 2d30a4f..14c53a9 100644 --- a/pkg/geoip/geoip.go +++ b/pkg/geoip/geoip.go @@ -75,7 +75,7 @@ func GetChatFlagEmoji(r *http.Request) (string, error) { var flags = []string{} // The country. Name or ISO code? - if name, ok := city.Country.Names[city.Country.IsoCode]; ok { + if name, ok := city.Country.Names["en"]; ok { flags = append(flags, name) } else { flags = append(flags, city.Country.IsoCode) @@ -85,7 +85,7 @@ func GetChatFlagEmoji(r *http.Request) (string, error) { if len(city.Subdivisions) > 0 { for _, sub := range city.Subdivisions { // Can we get its name? - if name, ok := sub.Names[sub.IsoCode]; ok { + if name, ok := sub.Names["en"]; ok { flags = append(flags, name) } else { flags = append(flags, sub.IsoCode)