feat: add ephemeral friend presence and invites
Add short-lived capability channels for online friend status and public-room invitations without storing accounts, fingerprints, social graphs, or offline messages.
This commit is contained in:
parent
029e247649
commit
21d17c4211
7 changed files with 626 additions and 3 deletions
23
docs/API.md
23
docs/API.md
|
|
@ -77,6 +77,25 @@ UDP rendezvous from the same ENet socket used for the gameplay connection.
|
|||
Requires the room lease bearer token. It consumes observed joining endpoints so the host can send
|
||||
same-socket UDP punch packets before ENet retries its connection.
|
||||
|
||||
## Live friend presence and invitations
|
||||
|
||||
These endpoints are an ephemeral capability channel, not an account or social-graph service. The
|
||||
server does not receive player identity fingerprints or a complete friend list, writes nothing to
|
||||
a database, and discards presence and invitations after short timeouts.
|
||||
|
||||
`POST /v1/presence` publishes or removes the caller's status under one or more secret write
|
||||
capabilities. `POST /v1/presence/query` reads the corresponding hashed channels. A published room
|
||||
is returned only while it remains a verified, version-compatible public room.
|
||||
|
||||
`POST /v1/invitations/poll` marks the supplied capability inboxes as currently reachable and
|
||||
consumes any live invitations. `POST /v1/invitations` sends a public-room invitation to one inbox.
|
||||
The send fails with `409 friend_offline` and `This person needs to be online to do this.` unless
|
||||
that inbox was polled recently. There is no offline delivery.
|
||||
|
||||
All four requests include the normal `game_version` and `protocol_version`. Capability values are
|
||||
64 lowercase hexadecimal characters and must be exchanged by the games during an authenticated,
|
||||
live NETfishing session.
|
||||
|
||||
## Error shape
|
||||
|
||||
```json
|
||||
|
|
@ -94,4 +113,6 @@ same-socket UDP punch packets before ENet retries its connection.
|
|||
- `X-Forwarded-For` is honored only when the immediate peer belongs to an explicitly configured
|
||||
trusted proxy CIDR.
|
||||
- Lease tokens authorize update and deletion but are never included in public listings.
|
||||
- The service is an ephemeral directory, not a source of gameplay authority.
|
||||
- Friend capability channels are short-lived and reveal neither identity fingerprints nor a full
|
||||
social graph to the service.
|
||||
- The service is an ephemeral directory, not a source of gameplay or friendship authority.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue