Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat: add url params: config.disableInviteFunctions, config.doNotStoreRoom and userInfo.displayName

Bettenbuk Zoltan39d789a0883a
diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js
index 7570499328..3cfa936866 100644
--- a/react/features/base/config/configWhitelist.js
+++ b/react/features/base/config/configWhitelist.js
@@ -87,6 +87,7 @@ export default [
'disableDeepLinking',
'disableH264',
'disableHPF',
+ 'disableInviteFunctions',
'disableLocalVideoFlip',
'disableNS',
'disableRemoteControl',
@@ -95,6 +96,7 @@ export default [
'disableSuspendVideo',
'disableThirdPartyRequests',
'displayJids',
+ 'doNotStoreRoom',
'e2eping',
'enableDisplayNameInStats',
'enableEmailInStats',
diff --git a/react/features/base/settings/middleware.js b/react/features/base/settings/middleware.js
index 890b77b926..c38141a9cf 100644
--- a/react/features/base/settings/middleware.js
+++ b/react/features/base/settings/middleware.js
@@ -137,8 +137,9 @@ function _updateLocalParticipantFromUrl({ dispatch, getState }) {
const urlParams
= parseURLParams(getState()['features/base/connection'].locationURL);
const urlEmail = urlParams['userInfo.email'];
+ const urlDisplayName = urlParams['userInfo.displayName'];
- if (!urlEmail) {
+ if (!urlEmail && !urlDisplayName) {
return;
}
@@ -147,7 +148,8 @@ function _updateLocalParticipantFromUrl({ dispatch, getState }) {
if (localParticipant) {
dispatch(participantUpdated({
...localParticipant,
- email: _.escape(urlEmail)
+ email: _.escape(urlEmail),
+ name: _.escape(urlDisplayName)
}));
}
}
diff --git a/react/features/conference/components/native/LonelyMeetingExperience.js b/react/features/conference/components/native/LonelyMeetingExperience.js
index b9e9c428cb..340cc2581c 100644
--- a/react/features/conference/components/native/LonelyMeetingExperience.js
+++ b/react/features/conference/components/native/LonelyMeetingExperience.js
@@ -18,6 +18,11 @@ import { Icon, IconAddPeople } from '../../../base/icons';
*/
type Props = {
+ /**
+ * True if the invite functions (dial out, invite, share...etc) are disabled.
+ */
+ _isInviteFunctionsDiabled: boolean,
+
/**
* True if it's a lonely meeting (participant count excluding fakes is 1).
*/
@@ -60,7 +65,7 @@ class LonelyMeetingExperience extends PureComponent<Props> {
* @inheritdoc
*/
render() {
- const { _isLonelyMeeting, _styles, t } = this.props;
+ const { _isInviteFunctionsDiabled, _isLonelyMeeting, _styles, t } = this.props;
if (!_isLonelyMeeting) {
return null;
@@ -75,24 +80,26 @@ class LonelyMeetingExperience extends PureComponent<Props> {
] }>
{ t('lonelyMeetingExperience.youAreAlone') }
</Text>
- <TouchableOpacity
- onPress = { this._onPress }
- style = { [
- styles.lonelyButton,
- _styles.lonelyButton
- ] }>
- <Icon
- size = { 24 }
- src = { IconAddPeople }
- style = { styles.lonelyButtonComponents } />
- <Text
+ { !_isInviteFunctionsDiabled && (
+ <TouchableOpacity
+ onPress = { this._onPress }
style = { [
- styles.lonelyButtonComponents,
- _styles.lonelyMessage
+ styles.lonelyButton,
+ _styles.lonelyButton
] }>
- { t('lonelyMeetingExperience.button') }
- </Text>
- </TouchableOpacity>
+ <Icon
+ size = { 24 }
+ src = { IconAddPeople }
+ style = { styles.lonelyButtonComponents } />
+ <Text
+ style = { [
+ styles.lonelyButtonComponents,
+ _styles.lonelyMessage
+ ] }>
+ { t('lonelyMeetingExperience.button') }
+ </Text>
+ </TouchableOpacity>
+ ) }
</View>
);
}
@@ -117,7 +124,10 @@ class LonelyMeetingExperience extends PureComponent<Props> {
* @returns {Props}
*/
function _mapStateToProps(state): $Shape<Props> {
+ const { disableInviteFunctions } = state['features/base/config'];
+
return {
+ _isInviteFunctionsDiabled: disableInviteFunctions,
_isLonelyMeeting: getParticipantCount(state) === 1,
_styles: ColorSchemeRegistry.get(state, 'Conference')
};
diff --git a/react/features/invite/components/add-people-dialog/native/InviteButton.js b/react/features/invite/components/add-people-dialog/native/InviteButton.js
index 3498b3563f..a7feb8b070 100644
--- a/react/features/invite/components/add-people-dialog/native/InviteButton.js
+++ b/react/features/invite/components/add-people-dialog/native/InviteButton.js
@@ -38,5 +38,20 @@ class InviteButton extends AbstractButton<Props, *> {
}
}
+/**
+ * Maps part of the Redux state to the props of this component.
+ *
+ * @param {Object} state - The Redux state.
+ * @param {Props} ownProps - The own props of the component.
+ * @returns {Props}
+ */
+function _mapStateToProps(state, ownProps: Props) {
+ const { disableInviteFunctions } = state['features/base/config'];
+
+ return {
+ visible: !disableInviteFunctions && ownProps.visible
+ };
+}
+
-export default translate(connect()(InviteButton));
+export default translate(connect(_mapStateToProps)(InviteButton));
diff --git a/react/features/recent-list/middleware.js b/react/features/recent-list/middleware.js
index 30b035e9d8..7469f3d264 100644
--- a/react/features/recent-list/middleware.js
+++ b/react/features/recent-list/middleware.js
@@ -86,27 +86,31 @@ function _appWillMount({ dispatch, getState }, next, action) {
* @returns {*} The result returned by {@code next(action)}.
*/
function _conferenceWillLeave({ dispatch, getState }, next, action) {
- let locationURL;
-
- /**
- * FIXME:
- * It is better to use action.conference[JITSI_CONFERENCE_URL_KEY]
- * in order to make sure we get the url the conference is leaving
- * from (i.e. the room we are leaving from) because if the order of events
- * is different, we cannot be guranteed that the location URL in base
- * connection is the url we are leaving from... not the one we are going to
- * (the latter happens on mobile -- if we use the web implementation);
- * however, the conference object on web does not have
- * JITSI_CONFERENCE_URL_KEY so we cannot call it and must use the other way
- */
- if (typeof APP === 'undefined') {
- locationURL = action.conference[JITSI_CONFERENCE_URL_KEY];
- } else {
- locationURL = getState()['features/base/connection'].locationURL;
+ const { doNotStoreRoom } = getState()['features/base/config'];
+
+ if (!doNotStoreRoom) {
+ let locationURL;
+
+ /**
+ * FIXME:
+ * It is better to use action.conference[JITSI_CONFERENCE_URL_KEY]
+ * in order to make sure we get the url the conference is leaving
+ * from (i.e. the room we are leaving from) because if the order of events
+ * is different, we cannot be guranteed that the location URL in base
+ * connection is the url we are leaving from... not the one we are going to
+ * (the latter happens on mobile -- if we use the web implementation);
+ * however, the conference object on web does not have
+ * JITSI_CONFERENCE_URL_KEY so we cannot call it and must use the other way
+ */
+ if (typeof APP === 'undefined') {
+ locationURL = action.conference[JITSI_CONFERENCE_URL_KEY];
+ } else {
+ locationURL = getState()['features/base/connection'].locationURL;
+ }
+ dispatch(
+ _updateConferenceDuration(
+ locationURL));
}
- dispatch(
- _updateConferenceDuration(
- locationURL));
return next(action);
}
@@ -122,7 +126,9 @@ function _conferenceWillLeave({ dispatch, getState }, next, action) {
* @returns {*} The result returned by {@code next(action)}.
*/
function _setRoom({ dispatch, getState }, next, action) {
- if (action.room) {
+ const { doNotStoreRoom } = getState()['features/base/config'];
+
+ if (!doNotStoreRoom && action.room) {
const { locationURL } = getState()['features/base/connection'];
if (locationURL) {