diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-18 21:25:16 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-18 21:25:16 +0100 |
commit | 259cb4e0a03d3db094aa87902549ccfc0b473963 (patch) | |
tree | e610dfd4a0ac944dc7e6908bb52f9b41de176c47 /src/utils | |
parent | 03d269ba1721e3d7fa03618148122787510c217b (diff) |
Add explicit documentation about payload of "nickChanged" message
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/webrtc/webrtc.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils/webrtc/webrtc.js b/src/utils/webrtc/webrtc.js index c5e30d270..613211397 100644 --- a/src/utils/webrtc/webrtc.js +++ b/src/utils/webrtc/webrtc.js @@ -957,6 +957,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) { |