Skip to content

Commit

Permalink
ignore irrelevant legacy ws events.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Sep 15, 2024
1 parent cd87c48 commit a569f72
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/internal/http/legacy/wstoclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ func (s *session) wsToClient(msg []byte) error {
return nil

// Signal Events
case event.SIGNAL_VIDEO, event.SIGNAL_AUDIO:
// ignore video and audio signals, because they are not part of the legacy protocol
return nil

case event.SIGNAL_OFFER:
request := &message.SignalDescription{}
err := json.Unmarshal(data.Payload, request)
Expand Down Expand Up @@ -543,6 +547,10 @@ func (s *session) wsToClient(msg []byte) error {
}

// Chat Events
case chat.CHAT_INIT:
// ignore chat init, because it is not part of the legacy protocol
return nil

case chat.CHAT_MESSAGE:
request := &chat.Message{}
err := json.Unmarshal(data.Payload, request)
Expand Down

0 comments on commit a569f72

Please sign in to comment.