diff --git a/libs/rayo.js b/libs/rayo.js index e6182b105..e719dde6b 100644 --- a/libs/rayo.js +++ b/libs/rayo.js @@ -37,7 +37,16 @@ Strophe.addConnectionPlugin('rayo', { name: 'JvbRoomName', value: roomName - }); + }).up(); + + if (sharedKey !== null && sharedKey.length) { + + req.c('header', + { + name: 'JvbRoomPassword', + value: sharedKey + }).up(); + } this.connection.sendIQ( req,