mirror of
https://github.com/dani/vroom.git
synced 2024-06-28 01:39:29 +02:00
Only notify you are owner if it's the case
Check that we're really owner now before notifying
This commit is contained in:
parent
e7d4e34a49
commit
1bc08f124a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user