Skip to content

Add UID to messages on a channel #121

Description

@oestrich

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"
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions