|
@@ -3941,6 +3941,63 @@ JitsiConference.prototype.joinLobby = function(displayName, email) {
|
3941
|
3941
|
return Promise.reject(new Error('The conference not started'));
|
3942
|
3942
|
};
|
3943
|
3943
|
|
|
3944
|
+/**
|
|
3945
|
+ * Gets the local id for a participant in a lobby room.
|
|
3946
|
+ * Returns undefined when current participant is not in the lobby room.
|
|
3947
|
+ * This is used for lobby room private chat messages.
|
|
3948
|
+ *
|
|
3949
|
+ * @returns {string}
|
|
3950
|
+ */
|
|
3951
|
+JitsiConference.prototype.myLobbyUserId = function() {
|
|
3952
|
+ if (this.room) {
|
|
3953
|
+ return this.room.getLobby().getLocalId();
|
|
3954
|
+ }
|
|
3955
|
+};
|
|
3956
|
+
|
|
3957
|
+/**
|
|
3958
|
+ * Sends a message to a lobby room.
|
|
3959
|
+ * When id is specified it sends a private message.
|
|
3960
|
+ * Otherwise it sends the message to all moderators.
|
|
3961
|
+ * @param {message} Object The message to send
|
|
3962
|
+ * @param {string} id The participant id.
|
|
3963
|
+ *
|
|
3964
|
+ * @returns {void}
|
|
3965
|
+ */
|
|
3966
|
+JitsiConference.prototype.sendLobbyMessage = function(message, id) {
|
|
3967
|
+ if (this.room) {
|
|
3968
|
+ if (id) {
|
|
3969
|
+ return this.room.getLobby().sendPrivateMessage(id, message);
|
|
3970
|
+ }
|
|
3971
|
+
|
|
3972
|
+ return this.room.getLobby().sendMessage(message);
|
|
3973
|
+ }
|
|
3974
|
+};
|
|
3975
|
+
|
|
3976
|
+/**
|
|
3977
|
+ * Adds a message listener to the lobby room
|
|
3978
|
+ * @param {Function} listener The listener function,
|
|
3979
|
+ * called when a new message is received in the lobby room.
|
|
3980
|
+ *
|
|
3981
|
+ * @returns {Function} Handler returned to be able to remove it later.
|
|
3982
|
+ */
|
|
3983
|
+JitsiConference.prototype.addLobbyMessageListener = function(listener) {
|
|
3984
|
+ if (this.room) {
|
|
3985
|
+ return this.room.getLobby().addMessageListener(listener);
|
|
3986
|
+ }
|
|
3987
|
+};
|
|
3988
|
+
|
|
3989
|
+/**
|
|
3990
|
+ * Removes a message handler from the lobby room
|
|
3991
|
+ * @param {Function} handler The handler function to remove.
|
|
3992
|
+ *
|
|
3993
|
+ * @returns {void}
|
|
3994
|
+ */
|
|
3995
|
+JitsiConference.prototype.removeLobbyMessageHandler = function(handler) {
|
|
3996
|
+ if (this.room) {
|
|
3997
|
+ return this.room.getLobby().removeMessageHandler(handler);
|
|
3998
|
+ }
|
|
3999
|
+};
|
|
4000
|
+
|
3944
|
4001
|
/**
|
3945
|
4002
|
* Denies an occupant in the lobby room access to the conference.
|
3946
|
4003
|
* @param {string} id The participant id.
|