Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

EventAPI v3 #58

Merged
merged 48 commits into from
Jul 12, 2022
Merged

EventAPI v3 #58

merged 48 commits into from
Jul 12, 2022

Conversation

AnatoleAM
Copy link
Contributor

@AnatoleAM AnatoleAM commented May 15, 2022

The next version of the Event API which is designed to work with the greater "v3" of the project.

Changes from v1

  • Standard structures between both WebSocket and Server-Sent Event protocols
  • Topics
  • Mutable sessions

Checklist

  • Universal "Connection" interface
  • Event Subscriptions
  • Transport: WebSocket
  • Transport: Server-Sent Events
  • Mutate sessions via REST (SSE)
  • Add documentation

@AnatoleAM AnatoleAM self-assigned this May 15, 2022
@AnatoleAM AnatoleAM mentioned this pull request May 15, 2022
8 tasks
@TroyKomodo
Copy link
Member

Almost, but will need to clean some stuff up more, such as moving towards common and also general tidying

Makefile Outdated Show resolved Hide resolved
@AnatoleAM AnatoleAM marked this pull request as ready for review May 31, 2022 01:32
@AnatoleAM AnatoleAM requested a review from TroyKomodo May 31, 2022 01:32
@Nerixyz
Copy link

Nerixyz commented Jun 26, 2022

Realted to SevenTV/Common#21

WebSocket#Read handles the Unsubscribe command/op, but IsClientSentOp doesn't check for the OpcodeUnsubscribe (instead it checks for OpcodeSignal which has the same value):

// Verify the opcode
if !client.IsClientSentOp(msg.Op) {
w.Close(events.CloseCodeUnknownOperation)
return
}

// Handle command - UNSUBSCRIBE
case events.OpcodeUnsubscribe:
if err = handler.Unsubscribe(gctx, msg); err != nil {
return
}
}

func IsClientSentOp(op events.Opcode) bool {
switch op {
case events.OpcodeHeartbeat,
events.OpcodeIdentify,
events.OpcodeResume,
events.OpcodeSubscribe,
events.OpcodeSignal:
return true
default:
return false
}
}

Dockerfile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@TroyKomodo TroyKomodo merged commit 18fd2b9 into master Jul 12, 2022
@TroyKomodo TroyKomodo deleted the anatole/eventapi-v3 branch July 12, 2022 18:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants