Skip to content

Commit

Permalink
Store location information in peer event meta (#1994)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlsmaycon authored May 22, 2024
1 parent 61034aa commit 91fa2e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion management/server/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ func (p *Peer) FQDN(dnsDomain string) string {

// EventMeta returns activity event meta related to the peer
func (p *Peer) EventMeta(dnsDomain string) map[string]any {
return map[string]any{"name": p.Name, "fqdn": p.FQDN(dnsDomain), "ip": p.IP, "created_at": p.CreatedAt}
return map[string]any{"name": p.Name, "fqdn": p.FQDN(dnsDomain), "ip": p.IP, "created_at": p.CreatedAt,
"location_city_name": p.Location.CityName, "location_country_code": p.Location.CountryCode,
"location_geo_name_id": p.Location.GeoNameID, "location_connection_ip": p.Location.ConnectionIP}
}

// Copy PeerStatus
Expand Down

0 comments on commit 91fa2e2

Please sign in to comment.