Skip to content

use player location instead of nakama server - #175

Open
iav-uk wants to merge 1 commit into
mainfrom
iav-geo-ip
Open

use player location instead of nakama server#175
iav-uk wants to merge 1 commit into
mainfrom
iav-geo-ip

Conversation

@iav-uk

@iav-uk iav-uk commented Aug 7, 2026

Copy link
Copy Markdown

summary:
SatoriPersonalizer.Authenticate and SatoriPersonalizer.Send called nk.GetSatori().Authenticate(...) / EventsPublish(...) without an IP address, and, in calls from the Nakama node to Satori, Satori's geo-IP lookup (satori/server/api_authenticate.go / extractClientAddressFromContext) is falling back to the Nakama server's own peer address instead of the player's

@iav-uk
iav-uk requested a review from Copilot August 7, 2026 14:52
@CLAassistant

CLAassistant commented Aug 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Satori integration to forward the player’s client IP address (when available in the Nakama runtime context) to Satori on server-to-server calls, so Satori’s geo-IP resolution uses the player location rather than the Nakama node’s own address.

Changes:

  • Pass runtime.RUNTIME_CTX_CLIENT_IP through to nk.GetSatori().Authenticate(...).
  • Pass runtime.RUNTIME_CTX_CLIENT_IP through to nk.GetSatori().EventsPublish(...).
  • Add a small helper (satoriClientIPAddress) to extract the client IP from context.Context and pass it as a variadic argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread personalizer_satori.go
@iav-uk iav-uk changed the title fix(location): use player location instead of nakama server use player location instead of nakama server Aug 7, 2026
@iav-uk
iav-uk requested a review from a team August 10, 2026 15:42
@iav-uk
iav-uk marked this pull request as ready for review August 10, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants