Skip to content

Commit

Permalink
Add explicit documentation about payload of "nickChanged" message
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
  • Loading branch information
danxuliu authored and backportbot[bot] committed Dec 9, 2020
1 parent 38e71ce commit 77d2daa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/webrtc/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,14 @@ export default function initWebRTC(signaling, _callParticipantCollection, _local
})

// Send the nick changed event via data channel and signaling
//
// The message format is different in each case. Due to historical reasons
// the payload of the data channel message is either a string that contains
// the name (if the participant is a guest) or an object with "name" and
// "userid" string fields (when the participant is a user).
//
// In the newer signaling message, on the other hand, the payload is always
// an object with only a "name" string field.
webrtc.on('nickChanged', function(name) {
let payload
if (signaling.settings.userId === null) {
Expand Down

0 comments on commit 77d2daa

Please sign in to comment.