Skip to content

Commit

Permalink
fix: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanWM committed Dec 31, 2024
1 parent 9c26efc commit 755434e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
3 changes: 2 additions & 1 deletion signalingserver/signaling_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (s *SignalingServer) HandleWebSocketConn(w http.ResponseWriter, r *http.Req
continue
}

if msg.Reach == message.Self {
if msg.Reach == message.Self || msg.PeerID == connID {
responseMsg.Sender = "server"
}

Expand All @@ -149,6 +149,7 @@ func (s *SignalingServer) HandleWebSocketConn(w http.ResponseWriter, r *http.Req
responseMsg.Kind = message.TextMessage
responseMsg.Content, err = json.Marshal(message.TextMessageContent{logMsg})
responseMsg.Reach = message.Self
responseMsg.Sender = "server"
if err != nil {
log.Println("Error marshaling error message")
continue
Expand Down

0 comments on commit 755434e

Please sign in to comment.