Merge pull request #442 from isymchych/lib-jitsi-meet
Lib-jitsi-meet imrovements
This commit is contained in:
commit
fc5e22ac29
|
@ -330,7 +330,7 @@ JitsiConference.prototype.lock = function (password) {
|
|||
|
||||
var conference = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
conference.xmpp.lockRoom(password, function () {
|
||||
conference.room.lockRoom(password || "", function () {
|
||||
resolve();
|
||||
}, function (err) {
|
||||
reject(err);
|
||||
|
@ -345,7 +345,7 @@ JitsiConference.prototype.lock = function (password) {
|
|||
* @returns {Promise}
|
||||
*/
|
||||
JitsiConference.prototype.unlock = function () {
|
||||
return this.lock(undefined);
|
||||
return this.lock();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -401,7 +401,7 @@ JitsiConference.prototype.kickParticipant = function (id) {
|
|||
|
||||
JitsiConference.prototype.onMemberJoined = function (jid, email, nick) {
|
||||
var id = Strophe.getResourceFromJid(jid);
|
||||
if (id === 'focus') {
|
||||
if (id === 'focus' || this.myUserId() === id) {
|
||||
return;
|
||||
}
|
||||
var participant = new JitsiParticipant(jid, this, nick);
|
||||
|
|
1343
lib-jitsi-meet.js
1343
lib-jitsi-meet.js
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,4 @@
|
|||
/* global $, $iq, APP, config, messageHandler,
|
||||
roomName, sessionTerminated, Strophe, Util */
|
||||
/* global $, $iq, Promise, Strophe */
|
||||
|
||||
var logger = require("jitsi-meet-logger").getLogger(__filename);
|
||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||
|
@ -354,6 +353,22 @@ Moderator.prototype.allocateConferenceFocus = function (callback) {
|
|||
);
|
||||
};
|
||||
|
||||
Moderator.prototype.authenticate = function () {
|
||||
var self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
self.connection.sendIQ(
|
||||
self.createConferenceIq(),
|
||||
function (result) {
|
||||
self.parseSessionId(result);
|
||||
resolve();
|
||||
}, function (error) {
|
||||
var code = $(error).find('>error').attr('code');
|
||||
reject(error, code);
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
Moderator.prototype.getLoginUrl = function (urlCallback, failureCallback) {
|
||||
var iq = $iq({to: this.getFocusComponent(), type: 'get'});
|
||||
iq.c('login-url', {
|
||||
|
|
Loading…
Reference in New Issue