Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UID to messages on a channel #121

Open
oestrich opened this issue Nov 22, 2019 · 0 comments
Open

Add UID to messages on a channel #121

oestrich opened this issue Nov 22, 2019 · 0 comments

Comments

@oestrich
Copy link
Owner

We should add a UID and timestamp field to messages. The server would add both of these fields when broadcasting out.

  • timestamp will be a ISO8601 timestamp in UTC
  • uid will be a string that uniquely identifies this message

Example

Sending stays as normal:

{
  "event": "channels/send",
  "ref": "28523394-6dcf-4c2a-ad1d-2d0ef8bb823b",
  "payload": {
    "channel": "grapevine",
    "name": "Player",
    "message": "Hello everyone!"
  }
}

Games listening on your channel now receive these extra fields.

{
  "event": "channels/broadcast",
  "ref": "89036074-446f-41ab-b87a-44ef1f962f2e",
  "payload": {
    "uid": "a61a2913-84c6-410d-bee0-e2bd8d34374e",
    "timestmap": "2019-11-22T18:00:00Z",
    "channel": "grapevine",
    "message": "Hello everyone!",
    "game": "ExVenture",
    "name": "Player"
  }
}
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

No branches or pull requests

1 participant