Skip to content

Commit

Permalink
Also accept messages for sessionid
Browse files Browse the repository at this point in the history
The sessionid is used as a remoteUserId for events like 'join-room'.

This allows the client to respond to that, initiating the negotiation.
  • Loading branch information
EtienneBruines authored Jan 6, 2021
1 parent 2ad1425 commit b138dc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/SSEConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function SSEConnection(connection, connectCallback) {
var mPeer = connection.multiPeersHandler;

function onMessagesCallback(message) {
if (message.remoteUserId != connection.userid) return;
if (message.remoteUserId != connection.userid && message.remoteUserId != conneciton.sessionid) return;

if (connection.peers[message.sender] && connection.peers[message.sender].extra != message.message.extra) {
connection.peers[message.sender].extra = message.message.extra;
Expand Down

0 comments on commit b138dc5

Please sign in to comment.