Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Update error events to carry additional properties #36

Merged
merged 7 commits into from
Aug 24, 2020

Conversation

11k
Copy link
Contributor

@11k 11k commented Aug 13, 2020

This PR sets the foundation for a better user experience when it comes to mutes. In doing so, a backwards-incompatible change to error events was introduced. Projects that connect to chat may break when this PR is merged and deployed.

  1. The payload for error (ERR) events is no longer a simple string, but a JSON object. After parsing the payload, the error message will be accessible via the description key. Put simply, ERR "errormessage" becomes ERR {"description":"errormessage"}.

  2. Payloads for incoming mute (MUTE) events now provide the duration of the mute in seconds, accessible via duration.

  3. muted error event payloads contain the mute time left in seconds, accessible via muteTimeLeft.

  4. Muted users will receive a muted error shortly after they connect to chat.

@ILiedAboutCake ILiedAboutCake merged commit 589df02 into destinygg:master Aug 24, 2020
@11k 11k deleted the improved-errors branch August 24, 2020 03:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants