From 109ce1c9ba6df5240e0e5ffb8c15401279825690 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 20 May 2014 09:35:46 +0200 Subject: [PATCH] Rename updateRole to getRoomInfo As it's now used for much more than getting our own role --- public/js/vroom.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index b88feea..5a51822 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -160,7 +160,7 @@ function initVroom(room) { } // Update our role - function updateRole(){ + function getRoomInfo(){ $.ajax({ data: { action: 'getRoomInfo', @@ -766,7 +766,7 @@ function initVroom(room) { $.notify(sprintf(locale.OWNER_PASSWORD_CHANGED_BY_s, stringEscape(peers[data.id].displayName)), 'warn'); } else{ - updateRole(); + getRoomInfo(); } }); webrtc.on('owner_password_removed', function(data){ @@ -774,14 +774,14 @@ function initVroom(room) { $.notify(sprintf(locale.OWNER_PASSWORD_REMOVED_BY_s, stringEscape(peers[data.id].displayName)), 'warn'); } else{ - updateRole(); + getRoomInfo(); } }); // Handle the readyToCall event: join the room webrtc.once('readyToCall', function () { peers.local.id = webrtc.connection.socket.sessionid; - updateRole(); + getRoomInfo(); webrtc.joinRoom(room); }); @@ -1009,7 +1009,7 @@ function initVroom(room) { success: function(data) { $('#authPass').val(''); if (data.status == 'success'){ - updateRole(); + getRoomInfo(); $.notify(data.msg, 'success'); } else{