From 1bc08f124ae13300ff19d0da5048e69b2f1c0996 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 6 Jun 2014 09:29:01 +0200 Subject: [PATCH] Only notify you are owner if it's the case Check that we're really owner now before notifying --- public/js/vroom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index 69a5c83..08dd716 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -913,8 +913,10 @@ function initVroom(room) { } if (data.payload.peer && data.payload.peer == peers.local.id && peers.local.role != 'owner'){ var who = (peers[data.id].hasName) ? peers[data.id].displayName : locale.A_ROOM_ADMIN; - $.notify(sprintf(locale.s_IS_PROMOTING_YOU, who), 'success'); getRoomInfo(); + if (peers.local.role == 'owner'){ + $.notify(sprintf(locale.s_IS_PROMOTING_YOU, who), 'success'); + } } else if (data.payload.peer != peers.local.id && peers[data.payload.peer]){ var who = (peers[data.id].hasName) ? peers[data.id].displayName : locale.A_ROOM_ADMIN;