diff --git a/conference.js b/conference.js index 3a524c55c9..06fe0c8888 100644 --- a/conference.js +++ b/conference.js @@ -17,7 +17,6 @@ import { import { sendAnalytics } from './react/features/analytics/functions'; import { maybeRedirectToWelcomePage, - redirectToStaticPage, reloadWithStoredParams } from './react/features/app/actions'; import { showModeratedNotification } from './react/features/av-moderation/actions'; @@ -275,12 +274,6 @@ class ConferenceConnector { switch (err) { - case JitsiConferenceErrors.NOT_ALLOWED_ERROR: { - // let's show some auth not allowed page - APP.store.dispatch(redirectToStaticPage('static/authError.html')); - break; - } - case JitsiConferenceErrors.RESERVATION_ERROR: { const [ code, msg ] = params; diff --git a/lang/main.json b/lang/main.json index 19c0d0420b..ae651b54e0 100644 --- a/lang/main.json +++ b/lang/main.json @@ -319,6 +319,7 @@ "embedMeeting": "Embed meeting", "enterDisplayName": "Enter your name", "error": "Error", + "errorRoomCreationRestriction": "You tried to join too quickly, please come back in a bit.", "gracefulShutdown": "Our service is currently down for maintenance. Please try again later.", "grantModeratorDialog": "Are you sure you want to grant moderator rights to {{participantName}}?", "grantModeratorTitle": "Grant moderator rights", @@ -1485,6 +1486,10 @@ "notification": { "demoteDescription": "Sent here by {{actor}}, raise your hand to participate", "description": "To participate raise your hand", + "noMainParticipantsDescription": "A participant needs to start the meeting. Please try again in a bit.", + "noMainParticipantsTitle": "This meeting hasn’t started yet.", + "noVisitorLobby": "You cannot join while there is a lobby enabled for the meeting.", + "notAllowedPromotion": "A participant needs to allow your request first.", "title": "You are a visitor in the meeting" } }, diff --git a/package-lock.json b/package-lock.json index 966371bea4..9703c256af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,7 @@ "js-md5": "0.6.1", "js-sha512": "0.8.0", "jwt-decode": "2.2.0", - "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1822.0.0+58a91446/lib-jitsi-meet.tgz", + "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1823.0.0+ec98b020/lib-jitsi-meet.tgz", "lodash": "4.17.21", "moment": "2.29.4", "moment-duration-format": "2.2.2", @@ -12866,8 +12866,8 @@ }, "node_modules/lib-jitsi-meet": { "version": "0.0.0", - "resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1822.0.0+58a91446/lib-jitsi-meet.tgz", - "integrity": "sha512-ppMF34ZUYGIgD0pYxKr22B77geyBInyTmmKrK9qwfeLXUy1NJraj2uR11I2VIQQLTOphY8Sr0MOCsFKAk+0r2w==", + "resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1823.0.0+ec98b020/lib-jitsi-meet.tgz", + "integrity": "sha512-jbROcnR1IWzp8I7quwj9uA8LMDE99tS6Wkxxf4ESAsYpc5wjbfJdqGaXKiIreWvlqM5NJTd/jMjw+DrZzbif1Q==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -29374,8 +29374,8 @@ } }, "lib-jitsi-meet": { - "version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1822.0.0+58a91446/lib-jitsi-meet.tgz", - "integrity": "sha512-ppMF34ZUYGIgD0pYxKr22B77geyBInyTmmKrK9qwfeLXUy1NJraj2uR11I2VIQQLTOphY8Sr0MOCsFKAk+0r2w==", + "version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1823.0.0+ec98b020/lib-jitsi-meet.tgz", + "integrity": "sha512-jbROcnR1IWzp8I7quwj9uA8LMDE99tS6Wkxxf4ESAsYpc5wjbfJdqGaXKiIreWvlqM5NJTd/jMjw+DrZzbif1Q==", "requires": { "@jitsi/js-utils": "2.2.1", "@jitsi/logger": "2.0.2", diff --git a/package.json b/package.json index 896e3cc383..f4a1f63f96 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "js-md5": "0.6.1", "js-sha512": "0.8.0", "jwt-decode": "2.2.0", - "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1822.0.0+58a91446/lib-jitsi-meet.tgz", + "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1823.0.0+ec98b020/lib-jitsi-meet.tgz", "lodash": "4.17.21", "moment": "2.29.4", "moment-duration-format": "2.2.2", diff --git a/react/features/analytics/AnalyticsEvents.ts b/react/features/analytics/AnalyticsEvents.ts index 61f5ebdffb..7a61771e75 100644 --- a/react/features/analytics/AnalyticsEvents.ts +++ b/react/features/analytics/AnalyticsEvents.ts @@ -331,15 +331,17 @@ export function createNetworkInfoEvent({ isOnline, networkType, details }: /** * Creates a "not allowed error" event. * + * @param {string} type - The type of the error. * @param {string} reason - The reason for the error. * @returns {Object} The event in a format suitable for sending via * sendAnalytics. */ -export function createNotAllowedErrorEvent(reason: string) { +export function createNotAllowedErrorEvent(type: string, reason: string) { return { action: 'not.allowed.error', attributes: { - reason + reason, + type } }; } diff --git a/react/features/base/conference/middleware.any.ts b/react/features/base/conference/middleware.any.ts index ea2c6c77a3..5586149b53 100644 --- a/react/features/base/conference/middleware.any.ts +++ b/react/features/base/conference/middleware.any.ts @@ -224,9 +224,30 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio break; } case JitsiConferenceErrors.NOT_ALLOWED_ERROR: { - const [ msg ] = error.params; + const [ type, msg ] = error.params; + + let descriptionKey; + let titleKey = 'dialog.tokenAuthFailed'; + + if (type === JitsiConferenceErrors.AUTH_ERROR_TYPES.NO_MAIN_PARTICIPANTS) { + descriptionKey = 'visitors.notification.noMainParticipantsDescription'; + titleKey = 'visitors.notification.noMainParticipantsTitle'; + } else if (type === JitsiConferenceErrors.AUTH_ERROR_TYPES.NO_VISITORS_LOBBY) { + descriptionKey = 'visitors.notification.noVisitorLobby'; + } else if (type === JitsiConferenceErrors.AUTH_ERROR_TYPES.PROMOTION_NOT_ALLOWED) { + descriptionKey = 'visitors.notification.notAllowedPromotion'; + } else if (type === JitsiConferenceErrors.AUTH_ERROR_TYPES.ROOM_CREATION_RESTRICTION) { + descriptionKey = 'dialog.errorRoomCreationRestriction'; + } + + APP.store.dispatch(showErrorNotification({ + descriptionKey, + hideErrorSupportLink: true, + titleKey + }, NOTIFICATION_TIMEOUT_TYPE.STICKY)); + + sendAnalytics(createNotAllowedErrorEvent(type, msg)); - sendAnalytics(createNotAllowedErrorEvent(msg)); break; } case JitsiConferenceErrors.OFFER_ANSWER_FAILED: diff --git a/resources/prosody-plugins/mod_fmuc.lua b/resources/prosody-plugins/mod_fmuc.lua index 3004f20e36..03f278abaf 100644 --- a/resources/prosody-plugins/mod_fmuc.lua +++ b/resources/prosody-plugins/mod_fmuc.lua @@ -63,7 +63,8 @@ module:hook('muc-occupant-pre-join', function (event) if host == local_domain then if room._main_room_lobby_enabled then - origin.send(st.error_reply(stanza, 'cancel', 'not-allowed', 'Visitors not allowed while lobby is on!')); + origin.send(st.error_reply(stanza, 'cancel', 'not-allowed', 'Visitors not allowed while lobby is on!') + :tag('no-visitors-lobby', { xmlns = 'jitsi:visitors' })); return true; else occupant.role = 'visitor'; diff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.lua index af4e6705b3..1a0f483372 100644 --- a/resources/prosody-plugins/mod_visitors_component.lua +++ b/resources/prosody-plugins/mod_visitors_component.lua @@ -341,16 +341,19 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul return; end module:log('error', 'Visitor needs to be allowed by a moderator %s', stanza.attr.from); - session.send(st.error_reply(stanza, 'cancel', 'not-allowed', 'Visitor needs to be allowed by a moderator')); + session.send(st.error_reply(stanza, 'cancel', 'not-allowed', 'Visitor needs to be allowed by a moderator') + :tag('promotion-not-allowed', { xmlns = 'jitsi:visitors' })); return true; - elseif is_vpaas(room) then - -- special case for vpaas where if someone with a visitor token tries to join a room, where - -- there are no visitors yet, we deny access - if session.jitsi_meet_context_user and session.jitsi_meet_context_user.role == 'visitor' then + else +-- if is_vpaas(room) then +-- -- special case for vpaas where if someone with a visitor token tries to join a room, where +-- -- there are no visitors yet, we deny access +-- if session.jitsi_meet_context_user and session.jitsi_meet_context_user.role == 'visitor' then session.log('warn', 'Deny user join as visitor in the main meeting, not approved'); session.send(st.error_reply( - stanza, 'cancel', 'not-allowed', 'Visitor tried to join the main room without approval')); - end + stanza, 'cancel', 'not-allowed', 'Visitor tried to join the main room without approval') + :tag('no-main-participants', { xmlns = 'jitsi:visitors' })); +-- end end end, 7); -- after muc_meeting_id, the logic for not joining before jicofo diff --git a/static/authError.html b/static/authError.html deleted file mode 100644 index 934e65d406..0000000000 --- a/static/authError.html +++ /dev/null @@ -1,15 +0,0 @@ - -
- - - - - -You might be missing the JWT or using an incompatible one.
-