|
@@ -1473,14 +1473,15 @@ JitsiConference.prototype.grantOwner = function(id) {
|
1473
|
1473
|
/**
|
1474
|
1474
|
* Kick participant from this conference.
|
1475
|
1475
|
* @param {string} id id of the participant to kick
|
|
1476
|
+ * @param {string} reason reason of the participant to kick
|
1476
|
1477
|
*/
|
1477
|
|
-JitsiConference.prototype.kickParticipant = function(id) {
|
|
1478
|
+JitsiConference.prototype.kickParticipant = function(id, reason) {
|
1478
|
1479
|
const participant = this.getParticipantById(id);
|
1479
|
1480
|
|
1480
|
1481
|
if (!participant) {
|
1481
|
1482
|
return;
|
1482
|
1483
|
}
|
1483
|
|
- this.room.kick(participant.getJid());
|
|
1484
|
+ this.room.kick(participant.getJid(), reason);
|
1484
|
1485
|
};
|
1485
|
1486
|
|
1486
|
1487
|
/**
|
|
@@ -1708,8 +1709,9 @@ JitsiConference.prototype.onMemberLeft = function(jid) {
|
1708
|
1709
|
* of the kick.
|
1709
|
1710
|
* @param {string?} kickedParticipantId - when it is not a kick for local participant,
|
1710
|
1711
|
* this is the id of the participant which was kicked.
|
|
1712
|
+ * @param {string} reason - reason of the participant to kick
|
1711
|
1713
|
*/
|
1712
|
|
-JitsiConference.prototype.onMemberKicked = function(isSelfPresence, actorId, kickedParticipantId) {
|
|
1714
|
+JitsiConference.prototype.onMemberKicked = function(isSelfPresence, actorId, kickedParticipantId, reason) {
|
1713
|
1715
|
// This check which be true when we kick someone else. With the introduction of lobby
|
1714
|
1716
|
// the ChatRoom KICKED event is now also emitted for ourselves (the kicker) so we want to
|
1715
|
1717
|
// avoid emitting an event where `undefined` kicked someone.
|
|
@@ -1721,7 +1723,7 @@ JitsiConference.prototype.onMemberKicked = function(isSelfPresence, actorId, kic
|
1721
|
1723
|
|
1722
|
1724
|
if (isSelfPresence) {
|
1723
|
1725
|
this.eventEmitter.emit(
|
1724
|
|
- JitsiConferenceEvents.KICKED, actorParticipant);
|
|
1726
|
+ JitsiConferenceEvents.KICKED, actorParticipant, reason);
|
1725
|
1727
|
|
1726
|
1728
|
this.leave();
|
1727
|
1729
|
|
|
@@ -1731,7 +1733,7 @@ JitsiConference.prototype.onMemberKicked = function(isSelfPresence, actorId, kic
|
1731
|
1733
|
const kickedParticipant = this.participants[kickedParticipantId];
|
1732
|
1734
|
|
1733
|
1735
|
this.eventEmitter.emit(
|
1734
|
|
- JitsiConferenceEvents.PARTICIPANT_KICKED, actorParticipant, kickedParticipant);
|
|
1736
|
+ JitsiConferenceEvents.PARTICIPANT_KICKED, actorParticipant, kickedParticipant, reason);
|
1735
|
1737
|
};
|
1736
|
1738
|
|
1737
|
1739
|
/**
|