|
@@ -1470,6 +1470,24 @@ JitsiConference.prototype.grantOwner = function(id) {
|
1470
|
1470
|
this.room.setAffiliation(participant.getJid(), 'owner');
|
1471
|
1471
|
};
|
1472
|
1472
|
|
|
1473
|
+/**
|
|
1474
|
+ * Revoke owner rights to the participant or local Participant as
|
|
1475
|
+ * the user might want to refuse to be a moderator.
|
|
1476
|
+ * @param {string} id id of the participant to revoke owner rights to.
|
|
1477
|
+ */
|
|
1478
|
+JitsiConference.prototype.revokeOwner = function(id) {
|
|
1479
|
+ const participant = this.getParticipantById(id);
|
|
1480
|
+ const isMyself = this.myUserId() === id;
|
|
1481
|
+ const role = this.isMembersOnly() ? 'member' : 'none';
|
|
1482
|
+
|
|
1483
|
+ if (isMyself) {
|
|
1484
|
+ this.room.setAffiliation(this.room.myroomjid, role);
|
|
1485
|
+ } else if (participant) {
|
|
1486
|
+ this.room.setAffiliation(participant.getJid(), role);
|
|
1487
|
+ }
|
|
1488
|
+};
|
|
1489
|
+
|
|
1490
|
+
|
1473
|
1491
|
/**
|
1474
|
1492
|
* Kick participant from this conference.
|
1475
|
1493
|
* @param {string} id id of the participant to kick
|