Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
lint fix

lint fix

lint fix

refactor

lint fix

modified elide logic

changed words

lint fix

lint fix

lint fix

fix(polls) improve resilience to bogus data

feat(tests): Adds self view, display name and end conference tests. (jitsi#15432)

* feat(tests): Use shorter display names for screenshots.

* feat(tests): Adds self view tests.

* feat(tests): Adds display name test.

* feat(tests): Adds end conference test.

fix(configWhitelist): Remove some props.

chore(deps) lib-jitsi-meet@latest

jitsi/lib-jitsi-meet@v1890.0.0+144b0cab...v1893.0.0+496b64a7

fix(connection): Adds default tenant value on error.

Avoids undefined error.

feat(customParticipantButton): metrics

fix(lang) fix typo in unsecure room name warning (jitsi#15468)

fix(video-menu): Hide "Mute all" option when all participants are moderators (jitsi#15461)

* Fixed exception for visibility state of mute all button

* Updated changes as per review: shifted conditional to the toggle

* chore: fix eslint warnings and errors

---------

Co-authored-by: Bhavik Arora <arorabhavik1001>

fix(readme): Fixes badge icon and f-droid link.

Fixes jitsi#15464
Fixes jitsi#15465

chore(deps) lib-jitsi-meet@latest

jitsi/lib-jitsi-meet@v1893.0.0+496b64a7...v1895.0.0+7de7d9aa

fix(readme): Fixes badge icon.

Fixes jitsi#15464

lang: Update main-zhCN.json (jitsi#15426)

main-zhCN.json
line 413 missing:
"sessTerminatedReason": "会议已经结束",

feat(tests): Adds desktop sharing test.

feat(tests): Adds dial-in test. (jitsi#15470)

* feat(tests): Adds dial-in test.

* feat(tests): Adds fake dial-in test.

* squash: switch to performance.now().

fix(polls) limit maximum amount of answers

chore(helpers) drop custom createDeferred() for Promise.withResolvers()

chore(deps) update eslint

Required for compatibility with new TypeScript plugins.

fix(lint) tame linter

feat(tests): Adds follow-me and invite dialog test. (jitsi#15476)

* feat(tests): Adds follow-me test.

* feat(tests): Adds invite dialog test.

* squash: fix lint.

fix(configWhitelist): Add p2p.mobileScreenshareCodec

refined logic

remove tooltip

cleaup

Update Notification.tsx

lint fix
wilsonfurtado2000 committed Jan 11, 2025

Verified

This commit was signed with the committer’s verified signature.
Freyskeyd Simon Paitrault
1 parent 97a18f2 commit a46f620
Showing 97 changed files with 4,624 additions and 1,829 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ mobile apps:

| Android | Android (F-Droid) | iOS |
|:-:|:-:|:-:|
| [<img src="resources/img/google-play-badge.png" height="50">](https://play.google.com/store/apps/details?id=org.jitsi.meet) | [<img src="resources/img/f-droid-badge.png" height="50">](https://f-droid.org/en/packages/org.jitsi.meet/) | [<img src="resources/img/appstore-badge.png" height="50">](https://itunes.apple.com/us/app/jitsi-meet/id1165103905) |
| [<img src="resources/img/google-play-badge.png" height="50">](https://play.google.com/store/apps/details?id=org.jitsi.meet) | [<img src="resources/img/f-droid-badge.png" height="50">](https://f-droid.org/packages/org.jitsi.meet/) | [<img src="resources/img/appstore-badge.png" height="50">](https://itunes.apple.com/us/app/jitsi-meet/id1165103905) |

If you are feeling adventurous and want to get an early scoop of the features as they are being
developed you can also sign up for our open beta testing here:
Binary file modified images/google-play-badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion interface_config.js
Original file line number Diff line number Diff line change
@@ -227,7 +227,7 @@ var interfaceConfig = {
/**
* Specify custom URL for downloading f droid app.
*/
// MOBILE_DOWNLOAD_LINK_F_DROID: 'https://f-droid.org/en/packages/org.jitsi.meet/',
// MOBILE_DOWNLOAD_LINK_F_DROID: 'https://f-droid.org/packages/org.jitsi.meet/',

// Connection indicators (
// CONNECTION_INDICATOR_AUTO_HIDE_ENABLED,
1 change: 1 addition & 0 deletions lang/main-zhCN.json
Original file line number Diff line number Diff line change
@@ -410,6 +410,7 @@
"sendPrivateMessageTitle": "私信回复?",
"serviceUnavailable": "服务不可用",
"sessTerminated": "通话已结束",
"sessTerminatedReason": "会议已经结束",
"sessionRestarted": "由于连接问题,呼叫重新启动。",
"shareAudio": "继续",
"shareAudioTitle": "如何分享音频",
2 changes: 1 addition & 1 deletion lang/main.json
Original file line number Diff line number Diff line change
@@ -1083,7 +1083,7 @@
"about": "You can add a $t(lockRoomPassword) to your meeting. Participants will need to provide the $t(lockRoomPassword) before they are allowed to join the meeting.",
"aboutReadOnly": "Moderator participants can add a $t(lockRoomPassword) to the meeting. Participants will need to provide the $t(lockRoomPassword) before they are allowed to join the meeting.",
"insecureRoomNameWarningNative": "The room name is unsafe. Unwanted participants may join your meeting. {{recommendAction}} Learn more about securing your meeting ",
"insecureRoomNameWarningWeb": "The room name is unsafe. Unwanted participants may join your meeting. {{recommendAction}} Learn more about securing you meeting <a href=\"{{securityUrl}}\" rel=\"security\" target=\"_blank\">here</a>.",
"insecureRoomNameWarningWeb": "The room name is unsafe. Unwanted participants may join your meeting. {{recommendAction}} Learn more about securing your meeting <a href=\"{{securityUrl}}\" rel=\"security\" target=\"_blank\">here</a>.",
"title": "Security Options",
"unsafeRoomActions": {
"meeting": "Consider securing your meeting using the security button.",
3,981 changes: 2,730 additions & 1,251 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -68,14 +68,15 @@
"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/v1890.0.0+144b0cab/lib-jitsi-meet.tgz",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1895.0.0+7de7d9aa/lib-jitsi-meet.tgz",
"lodash-es": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",
"null-loader": "4.0.1",
"optional-require": "1.0.3",
"pixelmatch": "5.3.0",
"promise.allsettled": "1.0.4",
"promise.withresolvers": "1.0.3",
"punycode": "2.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
@@ -134,8 +135,9 @@
"@babel/plugin-transform-private-methods": "7.25.9",
"@babel/preset-env": "7.25.9",
"@babel/preset-react": "7.25.9",
"@jitsi/eslint-config": "4.1.10",
"@jitsi/eslint-config": "5.0.9",
"@react-native/metro-config": "0.75.4",
"@stylistic/eslint-plugin": "2.12.1",
"@types/amplitude-js": "8.16.5",
"@types/audioworklet": "0.0.29",
"@types/dom-screen-wake-lock": "1.0.1",
@@ -161,8 +163,8 @@
"@types/w3c-image-capture": "1.0.6",
"@types/w3c-web-hid": "1.0.3",
"@types/zxcvbn": "4.4.1",
"@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.5",
"@typescript-eslint/eslint-plugin": "8.19.1",
"@typescript-eslint/parser": "8.19.1",
"@wdio/allure-reporter": "9.4.3",
"@wdio/cli": "9.4.3",
"@wdio/globals": "9.4.3",
@@ -174,12 +176,12 @@
"circular-dependency-plugin": "5.2.0",
"clean-css-cli": "4.3.0",
"css-loader": "6.8.1",
"eslint": "8.40.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "46.2.6",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-native": "4.0.0",
"eslint-plugin-typescript-sort-keys": "2.3.0",
"eslint": "8.57.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsdoc": "50.6.1",
"eslint-plugin-react": "7.37.3",
"eslint-plugin-react-native": "5.0.0",
"eslint-plugin-typescript-sort-keys": "3.3.0",
"jetifier": "1.6.4",
"jsonwebtoken": "9.0.2",
"metro-react-native-babel-preset": "0.77.0",
@@ -221,9 +223,11 @@
"tsc-test:native": "tsc --project tsconfig.native.json --listFilesOnly | grep -v node_modules | grep web",
"start": "make dev",
"test": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.conf.ts",
"test-single": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.conf.ts --spec",
"test-ff": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.firefox.conf.ts",
"test-dev": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.dev.conf.ts",
"test-grid": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.conf.ts"
"test-grid": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.conf.ts",
"test-grid-single": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.conf.ts --spec"
},
"resolutions": {
"@types/react": "17.0.14",
20 changes: 5 additions & 15 deletions react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -14,24 +14,14 @@ module.exports = {
project: [ './tsconfig.web.json', './tsconfig.native.json' ]
},
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'interface',
'format': [ 'PascalCase' ],
'custom': {
'regex': '^I[A-Z]',
'match': true
}
}
]
// TODO: Remove these and fix the warnings
'@typescript-eslint/no-unsafe-function-type': 0,
'@typescript-eslint/no-wrapper-object-types': 0,

'@typescript-eslint/no-require-imports': 0
}
}
],
'rules': {
// XXX remove this eventually.
'react/jsx-indent-props': 0
},
'settings': {
'react': {
'version': 'detect'
2 changes: 2 additions & 0 deletions react/features/always-on-top/index.tsx
Original file line number Diff line number Diff line change
@@ -4,8 +4,10 @@ import ReactDOM from 'react-dom';
import AlwaysOnTop from './AlwaysOnTop';

// Render the main/root Component.
/* eslint-disable-next-line react/no-deprecated */
ReactDOM.render(<AlwaysOnTop />, document.getElementById('react'));

window.addEventListener(
'beforeunload',
/* eslint-disable-next-line react/no-deprecated */
() => ReactDOM.unmountComponentAtNode(document.getElementById('react') ?? document.body));
2 changes: 1 addition & 1 deletion react/features/analytics/AnalyticsEvents.ts
Original file line number Diff line number Diff line change
@@ -311,7 +311,7 @@ export function createInviteDialogEvent(
* @returns {Object}
*/
export function createNetworkInfoEvent({ isOnline, networkType, details }:
{ details?: Object; isOnline: boolean; networkType?: string; }) {
{ details?: Object; isOnline: boolean; networkType?: string; }) {
const attributes: {
details?: Object;
isOnline: boolean;
44 changes: 29 additions & 15 deletions react/features/analytics/functions.ts
Original file line number Diff line number Diff line change
@@ -154,6 +154,30 @@ export async function createHandlers({ getState }: IStore) {
return handlers;
}

/**
* Checks whether a url is a data URL or not.
*
* @param {string} url - The URL to be checked.
* @returns {boolean}
*/
function isDataURL(url?: string): boolean {
if (typeof url !== 'string') { // The icon will be ignored
return false;
}

try {
const urlObject = new URL(url);

if (urlObject.protocol === 'data:') {
return false;
}
} catch {
return false;
}

return true;
}

/**
* Inits JitsiMeetJS.analytics by setting permanent properties and setting the handlers from the loaded scripts.
* NOTE: Has to be used after JitsiMeetJS.init. Otherwise analytics will be null.
@@ -186,6 +210,7 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
isPromotedFromVisitor?: boolean;
isVisitor?: boolean;
overwritesCustomButtonsWithURL?: boolean;
overwritesCustomParticipantButtonsWithURL?: boolean;
overwritesDefaultLogoUrl?: boolean;
overwritesDeploymentUrls?: boolean;
overwritesEtherpadBase?: boolean;
@@ -287,23 +312,12 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
const customToolbarButtons = params['config.customToolbarButtons'] ?? [];

permanentProperties.overwritesCustomButtonsWithURL = Boolean(
customToolbarButtons.find(({ icon }: { icon: string; }) => {
if (typeof icon !== 'string') { // The icon will be ignored
return false;
}

try {
const url = new URL(icon);
customToolbarButtons.find(({ icon }: { icon: string; }) => isDataURL(icon)));

if (url.protocol === 'data:') {
return false;
}
} catch {
return false;
}
const customParticipantMenuButtons = params['config.customParticipantMenuButtons'] ?? [];

return true;
}));
permanentProperties.overwritesCustomParticipantButtonsWithURL = Boolean(
customParticipantMenuButtons.find(({ icon }: { icon: string; }) => isDataURL(icon)));

// Optionally, include local deployment information based on the
// contents of window.config.deploymentInfo.
1 change: 0 additions & 1 deletion react/features/app/actions.any.ts
Original file line number Diff line number Diff line change
@@ -158,4 +158,3 @@ export function maybeRedirectToTokenAuthUrl(
return false;
}


6 changes: 2 additions & 4 deletions react/features/app/components/AbstractApp.ts
Original file line number Diff line number Diff line change
@@ -27,11 +27,9 @@ export interface IProps {
*/
export class AbstractApp<P extends IProps = IProps> extends BaseApp<P> {
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
* The deferred for the initialization {{promise, resolve, reject}}.
*/
_init: {
promise: Promise<any>;
};
_init: PromiseWithResolvers<any>;

/**
* Initializes the app.
5 changes: 1 addition & 4 deletions react/features/app/getRouteToRender.web.ts
Original file line number Diff line number Diff line change
@@ -140,10 +140,7 @@ function _getWebWelcomePageRoute(state: IReduxState) {
*
* @returns {Object}
*/
function _getEmptyRoute(): {
component: React.ReactNode;
href?: string;
} {
function _getEmptyRoute(): { component: React.ReactNode; href?: string; } {
return {
component: BlankPage,
href: undefined
3 changes: 1 addition & 2 deletions react/features/app/middleware.ts
Original file line number Diff line number Diff line change
@@ -113,8 +113,7 @@ function _isMaybeSplitBrainError(getState: IStore['getState'], action: AnyAction
const { error } = action;
const isShardChangedError = error
&& error.message === 'item-not-found'
&& error.details
&& error.details.shard_changed;
&& error.details?.shard_changed;

if (isShardChangedError) {
const state = getState();
7 changes: 2 additions & 5 deletions react/features/base/app/components/BaseApp.tsx
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ import PersistenceRegistry from '../../redux/PersistenceRegistry';
import ReducerRegistry from '../../redux/ReducerRegistry';
import StateListenerRegistry from '../../redux/StateListenerRegistry';
import SoundCollection from '../../sounds/components/SoundCollection';
import { createDeferred } from '../../util/helpers';
import { appWillMount, appWillUnmount } from '../actions';
import logger from '../logger';

@@ -46,9 +45,7 @@ export default class BaseApp<P> extends Component<P, IState> {
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
*/
_init: {
promise: Promise<any>;
};
_init: PromiseWithResolvers<any>;

/**
* Initializes a new {@code BaseApp} instance.
@@ -79,7 +76,7 @@ export default class BaseApp<P> extends Component<P, IState> {
* @see {@link #_initStorage}
* @type {Promise}
*/
this._init = createDeferred<void>();
this._init = Promise.withResolvers();

try {
await this._initStorage();
7 changes: 3 additions & 4 deletions react/features/base/conference/middleware.any.ts
Original file line number Diff line number Diff line change
@@ -248,8 +248,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio
}

!error.recoverable
&& conference
&& conference.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
&& conference?.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
// Even though we don't care too much about the failure, it may be
// good to know that it happen, so log it (on the info level).
logger.info('JitsiConference.leave() rejected with:', reason);
@@ -430,7 +429,7 @@ function _connectionFailed({ dispatch, getState }: IStore, next: Function, actio
} as INotificationProps;

const { locationURL = { href: '' } as URL } = getState()['features/base/connection'];
const { tenant } = parseURIString(locationURL.href) || {};
const { tenant = '' } = parseURIString(locationURL.href) || {};

if (tenant.startsWith('-') || tenant.endsWith('-')) {
notificationProps.descriptionKey = 'notify.invalidTenantHyphenDescription';
@@ -551,7 +550,7 @@ function _pinParticipant({ getState }: IStore, next: Function, action: AnyAction
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
const local
= participantById?.local
|| (!id && pinnedParticipant && pinnedParticipant.local);
|| (!id && pinnedParticipant?.local);
let participantIdForEvent;

if (local) {
2 changes: 1 addition & 1 deletion react/features/base/conference/reducer.ts
Original file line number Diff line number Diff line change
@@ -495,7 +495,7 @@ function _conferenceJoined(state: IConferenceState, { conference }: { conference
* reduction of the specified action.
*/
function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }:
{ conference: IJitsiConference; type: string; }) {
{ conference: IJitsiConference; type: string; }) {
const nextState = { ...state };

// The redux action CONFERENCE_LEFT is the last time that we should be
16 changes: 12 additions & 4 deletions react/features/base/config/configWhitelist.ts
Original file line number Diff line number Diff line change
@@ -76,7 +76,6 @@ export default [
'channelLastN',
'connectionIndicators',
'constraints',
'customToolbarButtons',
'brandingRoomAlias',
'debug',
'debugAudioLevels',
@@ -149,7 +148,6 @@ export default [
'enableNoisyMicDetection',
'enableTcc',
'enableAutomaticUrlCopy',
'etherpad_base',
'faceLandmarks',
'failICE',
'feedbackPercentage',
@@ -172,7 +170,6 @@ export default [
'hideAddRoomButton',
'hideEmailInSettings',
'hideLobbyButton',
'hosts',
'iAmRecorder',
'iAmSipGateway',
'ignoreStartMuted',
@@ -195,6 +192,7 @@ export default [
'p2p.enabled',
'p2p.iceTransportPolicy',
'p2p.mobileCodecPreferenceOrder',
'p2p.mobileScreenshareCodec',
'participantMenuButtonsWithNotifyClick',
'participantsPane',
'pcStatsInterval',
@@ -236,7 +234,17 @@ export default [
'useTurnUdp',
'videoQuality',
'visitors',
'watchRTCConfigParams',
'watchRTCConfigParams.console',
'watchRTCConfigParams.allowBrowserLogCollection',
'watchRTCConfigParams.collectionInterval',
'watchRTCConfigParams.debug',
'watchRTCConfigParams.keys',
'watchRTCConfigParams.logGetStats',
'watchRTCConfigParams.rtcApiKey',
'watchRTCConfigParams.rtcPeerId',
'watchRTCConfigParams.rtcRoomId',
'watchRTCConfigParams.rtcTags',
'watchRTCConfigParams.rtcToken',
'webrtcIceTcpDisable',
'webrtcIceUdpDisable',
'whiteboard.enabled'
2 changes: 1 addition & 1 deletion react/features/base/config/functions.web.ts
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
android.downloadLink = android.downloadLink
|| 'https://play.google.com/store/apps/details?id=org.jitsi.meet';
android.appPackage = android.appPackage || 'org.jitsi.meet';
android.fDroidUrl = android.fDroidUrl || 'https://f-droid.org/en/packages/org.jitsi.meet/';
android.fDroidUrl = android.fDroidUrl || 'https://f-droid.org/packages/org.jitsi.meet/';
if (android.dynamicLink) {
android.dynamicLink.apn = android.dynamicLink.apn || 'org.jitsi.meet';
android.dynamicLink.appCode = android.dynamicLink.appCode || 'w2atb';
2 changes: 1 addition & 1 deletion react/features/base/i18n/middleware.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ MiddlewareRegistry.register(store => next => action => {
? action.value
: store.getState()['features/dynamic-branding'];

if (language && labels && labels[language]) {
if (language && labels?.[language]) {
changeLanguageBundle(language, labels[language])
.catch(err => {
logger.log('Error setting dynamic language bundle', err);
Loading

0 comments on commit a46f620

Please sign in to comment.