feat(external-api) Expose deployment info through API
- Set region along shard from xmpp
This commit is contained in:
parent
3b33ba3f5d
commit
7102ad1186
|
@ -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…
Reference in New Issue