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

Send tells to remote players #2

Closed
oestrich opened this issue Jul 1, 2018 · 0 comments
Closed

Send tells to remote players #2

oestrich opened this issue Jul 1, 2018 · 0 comments

Comments

@oestrich
Copy link
Owner

oestrich commented Jul 1, 2018

Send a remote player a tells. This should be placed behind a tells support flag. Suggested you also support the players flag.

tells/send

To send a new message, use this event.

{
  "event": "tells/send",
  "ref": "5c528fc3-cb9e-4867-98ea-6e235594241e",
  "payload": {
    "from": "Player",
    "game": "MidMUD",
    "player": "eric",
    "sent_at": "2018-07-17T13:12:28Z",
    "message": "hi"
  }
}
  • from - local player
  • game - remote game, this is the short name of a game
  • player - remote player
  • sent_at - ISO8601 formatted timestamp of when the message was sent, in the UTC timezone
  • message - the message

If the game and player is online on Gossip, then the message will be forwarded. A ref is required.

{
  "event": "tells/send",
  "ref": "5c528fc3-cb9e-4867-98ea-6e235594241e",
  "status": "success"
}
{
  "event": "tells/send",
  "ref": "5c528fc3-cb9e-4867-98ea-6e235594241e",
  "status": "failure",
  "error": "game offline"
}

Possible errors:

  • Game is offline
  • Game is not receiving tells (not supported, but connected)
  • Player is offline

tells/receive

When the game receives a new direct message from another game on the network, this event will be pushed.

{
  "event": "tells/receive",
  "ref": "d4a08749-acbe-45ab-bc0f-51609fd6b95b",
  "payload": {
    "game": "AMud",
    "from": "Player",
    "player": "eric",
    "sent_at": "2018-07-17T13:12:28Z",
    "message": "hi"
  }
}
  • from - remove player
  • game - remote game, this is the short name of a game
  • player - local player
  • sent_at - ISO8601 formatted timestamp of when the message was sent, in the UTC timezone
  • message - the message
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