feat(external-api) Expose deployment info through API

- Set region along shard from xmpp
pull/10123/head jitsi-meet_6446
hmuresan 4 years ago committed by Дамян Минков
parent 3b33ba3f5d
commit 7102ad1186
  1. 3
      modules/API/API.js
  2. 11
      modules/API/external/external_api.js
  3. 5
      resources/prosody-plugins/mod_jiconop.lua

@ -560,6 +560,9 @@ function initCommands() {
});
});
break;
case 'deployment-info':
callback(APP.store.getState()['features/base/config'].deploymentInfo);
break;
case 'invite': {
const { invitees } = request;

@ -956,6 +956,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
return avatarURL;
}
/**
* Gets the deployment info.
*
* @returns {Promise} - Resolves with the deployment info object.
*/
getDeploymentInfo() {
return this._transport.sendRequest({
name: 'deployment-info'
});
}
/**
* Returns the display name of a participant.
*

@ -10,6 +10,11 @@ if shard_name_config then
module:add_identity("server", "shard", shard_name_config);
end
local region_name_config = module:get_option_string('region_name');
if region_name_config then
module:add_identity("server", "region", region_name_config);
end
-- this is after xmpp-bind, the moment a client has resource and can be contacted
module:hook("resource-bind", function (event)
local session = event.session;

Loading…
Cancel
Save