From 276d012e7c19bd4390cb5b1f167904ab13d1b4a1 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento <rodrigoknascimento@gmail.com> Date: Fri, 17 Mar 2023 11:27:53 -0300 Subject: [PATCH] refactor(eslint): Add "no-floating-promises" eslint rule - Part 1 (#28463) --- .github/workflows/ci-test-e2e.yml | 2 +- .github/workflows/ci.yml | 12 ++-- apps/meteor/.eslintrc.json | 6 +- .../meteor/app/2fa/server/startup/settings.ts | 2 +- apps/meteor/app/analytics/server/settings.ts | 2 +- apps/meteor/app/api/server/settings.ts | 2 +- apps/meteor/app/api/server/v1/roles.ts | 2 +- apps/meteor/app/api/server/v1/stats.ts | 2 +- apps/meteor/app/api/server/v1/users.ts | 2 +- .../apple/server/appleOauthRegisterService.ts | 2 +- .../app/apps/server/bridges/commands.ts | 2 +- .../app/apps/server/bridges/messages.ts | 11 ++-- .../app/apps/server/bridges/uiInteraction.ts | 2 +- apps/meteor/app/assets/server/assets.ts | 6 +- .../authentication/server/startup/settings.ts | 2 +- .../server/methods/addUserToRole.ts | 2 +- .../server/methods/removeUserFromRole.ts | 4 +- .../app/autotranslate/server/settings.ts | 10 ++-- .../meteor/app/bot-helpers/server/settings.ts | 2 +- .../server/methods/saveRoomSettings.ts | 6 +- apps/meteor/app/colors/server/settings.ts | 2 +- apps/meteor/app/crowd/server/settings.ts | 2 +- .../server/methods/deleteCustomSound.ts | 2 +- .../server/methods/insertOrUpdateSound.ts | 2 +- .../custom-sounds/server/startup/settings.ts | 2 +- apps/meteor/app/discussion/server/config.ts | 6 +- apps/meteor/app/dolphin/server/startup.ts | 16 ++--- apps/meteor/app/drupal/server/startup.ts | 2 +- apps/meteor/app/e2e/client/tabbar.ts | 2 +- apps/meteor/app/e2e/server/index.js | 2 +- .../server/methods/requestSubscriptionKeys.js | 2 +- apps/meteor/app/e2e/server/settings.ts | 2 +- .../server/methods/deleteEmojiCustom.js | 2 +- .../server/methods/insertOrUpdateEmoji.js | 4 +- .../emoji-custom/server/startup/settings.ts | 2 +- .../error-handler/server/startup/settings.ts | 2 +- .../federation/server/endpoints/dispatch.js | 2 +- .../app/federation/server/startup/settings.ts | 2 +- .../file-upload/server/startup/settings.ts | 2 +- .../app/github-enterprise/server/startup.ts | 2 +- apps/meteor/app/gitlab/server/startup.ts | 2 +- .../iframe-login/server/iframe_rocketchat.ts | 2 +- .../server/functions/findOrCreateInvite.js | 2 +- apps/meteor/app/irc/server/irc-settings.ts | 2 +- apps/meteor/app/katex/server/settings.ts | 6 +- .../lib/server/functions/addOAuthService.ts | 58 +++++++++---------- .../app/lib/server/functions/addUserToRoom.ts | 2 +- .../lib/server/functions/cleanRoomHistory.ts | 2 +- .../lib/server/functions/createDirectRoom.ts | 2 +- .../app/lib/server/functions/createRoom.ts | 2 +- .../app/lib/server/functions/deleteMessage.ts | 4 +- .../app/lib/server/functions/deleteUser.ts | 2 +- .../server/functions/notifications/desktop.js | 2 +- .../app/lib/server/functions/setRealName.ts | 4 +- .../app/lib/server/functions/setRoomAvatar.ts | 4 +- .../app/lib/server/functions/setStatusText.ts | 2 +- .../app/lib/server/functions/setUserAvatar.ts | 2 +- .../app/lib/server/functions/setUsername.ts | 2 +- .../app/lib/server/functions/updateMessage.ts | 2 +- .../app/lib/server/methods/addUsersToRoom.js | 2 +- .../app/lib/server/methods/filterATAllTag.js | 2 +- .../app/lib/server/methods/filterATHereTag.js | 2 +- .../app/lib/server/methods/sendMessage.ts | 2 +- apps/meteor/app/lib/server/startup/email.ts | 2 +- .../meteor/app/lib/server/startup/settings.ts | 30 +++++----- .../startup/settingsOnLoadDirectReply.ts | 2 +- apps/meteor/app/livechat/server/config.ts | 6 +- .../livechat/server/externalFrame/settings.ts | 2 +- apps/meteor/app/livechat/server/lib/Helper.js | 2 +- .../app/livechat/server/lib/Livechat.js | 4 +- .../app/livechat/server/lib/LivechatTyped.ts | 4 +- apps/meteor/app/mailer/server/api.ts | 3 +- apps/meteor/app/mapview/server/settings.ts | 4 +- apps/meteor/app/mentions/server/server.js | 2 +- .../meteor/app/message-pin/server/settings.ts | 2 +- .../app/message-star/server/settings.ts | 2 +- .../server/lib/settings.ts | 2 +- .../client/models/CachedChatSubscription.ts | 2 +- apps/meteor/app/nextcloud/server/startup.ts | 2 +- .../notifications/server/lib/Notifications.ts | 2 +- .../server/oauth/default-services.ts | 3 +- apps/meteor/app/otr/client/OTRRoom.ts | 2 +- apps/meteor/app/otr/server/settings.ts | 2 +- .../app/reactions/server/setReaction.ts | 2 +- .../server/startup/settings.ts | 2 +- .../app/settings/server/SettingsRegistry.ts | 2 +- .../meteor/app/slackbridge/server/settings.ts | 2 +- .../server/server.ts | 6 +- .../app/slashcommands-create/server/server.ts | 2 +- .../app/slashcommands-help/server/server.ts | 2 +- .../app/slashcommands-hide/server/hide.ts | 4 +- .../app/slashcommands-invite/server/server.ts | 8 +-- .../slashcommands-inviteall/server/server.ts | 8 +-- .../app/slashcommands-join/server/server.ts | 2 +- .../app/slashcommands-kick/server/server.ts | 2 +- .../app/slashcommands-leave/server/leave.ts | 2 +- .../app/slashcommands-msg/server/server.ts | 4 +- .../app/slashcommands-mute/server/mute.ts | 2 +- .../app/slashcommands-mute/server/unmute.ts | 2 +- .../app/slashcommands-status/client/status.ts | 2 +- .../app/slashcommands-status/server/status.ts | 4 +- .../server/server.ts | 6 +- .../app/smarsh-connector/server/settings.js | 2 +- .../server/functions/updateStatsCounter.ts | 2 +- apps/meteor/app/theme/server/variables.ts | 2 +- apps/meteor/app/threads/server/settings.ts | 2 +- apps/meteor/app/tokenpass/server/startup.js | 2 +- .../client/models/CachedCollection.ts | 6 +- .../client/models/CachedCollectionManager.ts | 2 +- .../client/actionButtons/messageAction.ts | 2 +- .../client/actionButtons/messageBox.ts | 2 +- .../ui-message/client/findParentMessage.ts | 2 +- .../ComposerBoxPopupPreview.tsx | 2 +- .../ui-utils/client/lib/RoomHistoryManager.ts | 2 +- .../app/ui-utils/client/lib/RoomManager.ts | 6 +- apps/meteor/app/ui-vrecord/server/settings.ts | 2 +- .../ui/client/lib/recorderjs/AudioRecorder.ts | 2 +- .../ui/client/views/app/photoswipeContent.ts | 2 +- .../server/methods/deleteCustomUserStatus.js | 2 +- .../methods/insertOrUpdateUserStatus.js | 4 +- .../app/version-check/server/addSettings.ts | 2 +- .../webdav/server/methods/addWebdavAccount.ts | 4 +- .../server/methods/removeWebdavAccount.ts | 2 +- .../app/webdav/server/startup/settings.ts | 2 +- apps/meteor/app/webrtc/server/settings.ts | 2 +- apps/meteor/app/wordpress/server/startup.ts | 2 +- apps/meteor/client/lib/banners.ts | 4 +- .../app/canned-responses/server/settings.ts | 2 +- .../license/server/license.internalService.ts | 8 +-- apps/meteor/ee/app/license/server/license.ts | 6 +- .../server/business-hour/Multiple.ts | 6 +- .../server/hooks/afterOnHoldChatResumed.ts | 2 +- .../server/hooks/autoCloseQueued.ts | 2 +- .../app/livechat-enterprise/server/index.ts | 6 +- .../server/lib/AutoCloseOnHoldScheduler.ts | 2 +- .../server/lib/AutoTransferChatScheduler.ts | 2 +- .../livechat-enterprise/server/lib/Helper.js | 2 +- .../server/lib/QueueInactivityMonitor.ts | 2 +- .../livechat-enterprise/server/settings.ts | 20 +++---- .../meteor/ee/app/settings/server/settings.ts | 2 +- apps/meteor/ee/server/NetworkBroker.ts | 6 +- .../server/apps/communication/websockets.ts | 20 +++---- apps/meteor/ee/server/apps/orchestrator.js | 2 +- apps/meteor/ee/server/apps/startup.ts | 2 +- apps/meteor/ee/server/lib/audit/startup.ts | 2 +- .../ee/server/lib/deviceManagement/startup.ts | 2 +- .../server/lib/engagementDashboard/startup.ts | 2 +- apps/meteor/ee/server/lib/ldap/Manager.ts | 2 +- apps/meteor/ee/server/lib/roles/insertRole.ts | 2 +- apps/meteor/ee/server/lib/roles/updateRole.ts | 2 +- apps/meteor/ee/server/lib/syncUserRoles.ts | 2 +- .../server/local-services/instance/service.ts | 2 +- .../server/services/ecdh-proxy/lib/server.ts | 8 +-- .../ee/server/settings/deviceManagement.ts | 2 +- apps/meteor/ee/server/settings/ldap.ts | 2 +- apps/meteor/ee/server/settings/saml.ts | 2 +- .../ee/server/settings/video-conference.ts | 2 +- apps/meteor/ee/server/startup/presence.ts | 10 ++-- apps/meteor/ee/server/startup/upsell.ts | 2 +- apps/meteor/server/cron/federation.ts | 8 +-- apps/meteor/server/cron/videoConferences.ts | 2 +- apps/meteor/server/email/IMAPInterceptor.ts | 2 +- .../server/features/EmailInbox/EmailInbox.ts | 4 +- .../EmailInbox/EmailInbox_Outgoing.ts | 6 +- apps/meteor/server/methods/addRoomLeader.js | 2 +- .../meteor/server/methods/addRoomModerator.js | 4 +- apps/meteor/server/methods/addRoomOwner.js | 4 +- apps/meteor/server/methods/eraseRoom.ts | 2 +- .../meteor/server/methods/removeRoomLeader.js | 2 +- .../server/methods/removeRoomModerator.js | 4 +- apps/meteor/server/methods/removeRoomOwner.ts | 4 +- apps/meteor/server/methods/resetAvatar.js | 2 +- .../modules/streamer/streamer.module.ts | 4 +- .../modules/watchers/watchers.module.ts | 46 +++++++-------- apps/meteor/server/services/banner/service.ts | 6 +- .../user/receiver/UserServiceReceiver.ts | 2 +- .../rocket-chat/adapters/Notification.ts | 4 +- .../rocket-chat/adapters/Settings.ts | 2 +- apps/meteor/server/services/meteor/service.ts | 4 +- .../providers/twilio.ts | 2 +- .../providers/voxtelesys.ts | 2 +- .../services/omnichannel-voip/service.ts | 2 +- apps/meteor/server/services/startup.ts | 2 +- .../services/video-conference/service.ts | 4 +- .../asterisk/ami/ContinuousMonitor.ts | 15 +++-- apps/meteor/server/services/voip/service.ts | 6 +- apps/meteor/server/settings/ldap.ts | 2 +- .../server/settings/userDataDownload.ts | 2 +- .../server/settings/video-conference.ts | 2 +- apps/meteor/server/startup/localServices.ts | 2 +- apps/meteor/tests/e2e/e2e-encryption.spec.ts | 2 +- apps/meteor/tests/e2e/fixtures/userStates.ts | 4 +- .../page-objects/fragments/home-sidenav.ts | 2 +- .../server/functions/settings.tests.ts | 2 +- ee/apps/ddp-streamer/src/Streamer.ts | 2 +- .../eslint-config/best-practices/index.js | 2 +- 196 files changed, 387 insertions(+), 379 deletions(-) diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index f7af24391d5..653be0455b5 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -197,7 +197,7 @@ jobs: env: IS_EE: ${{ inputs.release == 'ee' && 'true' || '' }} run: | - for i in $(seq 1 5); do + for i in $(seq 1 2); do npm run testapi && s=0 && break || s=$? docker compose -f ../../docker-compose-ci.yml logs --tail=100 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12a79b5be91..b41b3769488 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,7 +201,7 @@ jobs: test-unit: name: 🔨 Test Unit - needs: [build, checks, release-versions] + needs: [build, release-versions] uses: ./.github/workflows/ci-test-unit.yml with: @@ -209,7 +209,7 @@ jobs: test-api: name: 🔨 Test API (CE) - needs: [build, checks, release-versions] + needs: [build, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -229,7 +229,7 @@ jobs: test-ui: name: 🔨 Test UI (CE) - needs: [build, checks, release-versions] + needs: [build, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -252,7 +252,7 @@ jobs: test-api-ee: name: 🔨 Test API (EE) - needs: [build, checks, release-versions] + needs: [build, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -275,7 +275,7 @@ jobs: test-ui-ee: name: 🔨 Test UI (EE) - needs: [build, checks, release-versions] + needs: [build, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -300,7 +300,7 @@ jobs: tests-done: name: ✅ Tests Done runs-on: ubuntu-20.04 - needs: [test-unit, test-api, test-ui, test-api-ee, test-ui-ee] + needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee] steps: - name: Test finish aggregation diff --git a/apps/meteor/.eslintrc.json b/apps/meteor/.eslintrc.json index c388c3861ca..12c564c9a5e 100644 --- a/apps/meteor/.eslintrc.json +++ b/apps/meteor/.eslintrc.json @@ -43,11 +43,11 @@ "error", { "checksVoidReturn": { - "arguments": false, - "attributes": false + "arguments": false } } - ] + ], + "@typescript-eslint/no-floating-promises": "warn" }, "parserOptions": { "project": ["./tsconfig.json"] diff --git a/apps/meteor/app/2fa/server/startup/settings.ts b/apps/meteor/app/2fa/server/startup/settings.ts index ce2b6d88979..bea3c4d9658 100644 --- a/apps/meteor/app/2fa/server/startup/settings.ts +++ b/apps/meteor/app/2fa/server/startup/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('Accounts', function () { +void settingsRegistry.addGroup('Accounts', function () { this.section('Two Factor Authentication', function () { const enable2FA = { _id: 'Accounts_TwoFactorAuthentication_Enabled', diff --git a/apps/meteor/app/analytics/server/settings.ts b/apps/meteor/app/analytics/server/settings.ts index ef1f6b5f073..a639225ee14 100644 --- a/apps/meteor/app/analytics/server/settings.ts +++ b/apps/meteor/app/analytics/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('Analytics', function addSettings() { +void settingsRegistry.addGroup('Analytics', function addSettings() { this.section('Piwik', function () { const enableQuery = { _id: 'PiwikAnalytics_enabled', value: true }; this.add('PiwikAnalytics_enabled', false, { diff --git a/apps/meteor/app/api/server/settings.ts b/apps/meteor/app/api/server/settings.ts index dce44913422..9204dee0840 100644 --- a/apps/meteor/app/api/server/settings.ts +++ b/apps/meteor/app/api/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('General', function () { +void settingsRegistry.addGroup('General', function () { this.section('REST API', function () { this.add('API_Upper_Count_Limit', 100, { type: 'int', public: false }); this.add('API_Default_Count', 50, { type: 'int', public: false }); diff --git a/apps/meteor/app/api/server/v1/roles.ts b/apps/meteor/app/api/server/v1/roles.ts index b8fd4479a70..66ab8eb519c 100644 --- a/apps/meteor/app/api/server/v1/roles.ts +++ b/apps/meteor/app/api/server/v1/roles.ts @@ -227,7 +227,7 @@ API.v1.addRoute( await Roles.removeUserRoles(user._id, [role._id], scope); if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type: 'removed', _id: role._id, u: { diff --git a/apps/meteor/app/api/server/v1/stats.ts b/apps/meteor/app/api/server/v1/stats.ts index 4f1f74383b8..7b3a92eb41a 100644 --- a/apps/meteor/app/api/server/v1/stats.ts +++ b/apps/meteor/app/api/server/v1/stats.ts @@ -52,7 +52,7 @@ API.v1.addRoute( events.params.forEach((event) => { const { eventName, ...params } = event; - telemetryEvent.call(eventName, params); + void telemetryEvent.call(eventName, params); }); return API.v1.success(); diff --git a/apps/meteor/app/api/server/v1/users.ts b/apps/meteor/app/api/server/v1/users.ts index 1445b283bb7..d4aef60f233 100644 --- a/apps/meteor/app/api/server/v1/users.ts +++ b/apps/meteor/app/api/server/v1/users.ts @@ -1119,7 +1119,7 @@ API.v1.addRoute( }); const { _id, username, statusText, roles, name } = user; - api.broadcast('presence.status', { + void api.broadcast('presence.status', { user: { status, _id, username, statusText, roles, name }, previousStatus: user.status, }); diff --git a/apps/meteor/app/apple/server/appleOauthRegisterService.ts b/apps/meteor/app/apple/server/appleOauthRegisterService.ts index 8678032b003..404badf3158 100644 --- a/apps/meteor/app/apple/server/appleOauthRegisterService.ts +++ b/apps/meteor/app/apple/server/appleOauthRegisterService.ts @@ -7,7 +7,7 @@ import { AppleCustomOAuth } from './AppleCustomOAuth'; new AppleCustomOAuth('apple', config); -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('Apple', function () { this.add('Accounts_OAuth_Apple', false, { type: 'boolean', public: true }); diff --git a/apps/meteor/app/apps/server/bridges/commands.ts b/apps/meteor/app/apps/server/bridges/commands.ts index 549c150c5c3..e891ddbc818 100644 --- a/apps/meteor/app/apps/server/bridges/commands.ts +++ b/apps/meteor/app/apps/server/bridges/commands.ts @@ -181,7 +181,7 @@ export class AppCommandsBridge extends CommandBridge { triggerId, ); - Promise.await(this.orch.getManager()?.getCommandManager().executeCommand(command, context)); + void Promise.await(this.orch.getManager()?.getCommandManager().executeCommand(command, context)); } private _appCommandPreviewer(command: string, parameters: any, message: RequiredField<Partial<IMessage>, 'rid'>): any { diff --git a/apps/meteor/app/apps/server/bridges/messages.ts b/apps/meteor/app/apps/server/bridges/messages.ts index b90e590bfca..cf440409385 100644 --- a/apps/meteor/app/apps/server/bridges/messages.ts +++ b/apps/meteor/app/apps/server/bridges/messages.ts @@ -60,7 +60,7 @@ export class AppMessageBridge extends MessageBridge { return; } - api.broadcast('notify.ephemeralMessage', user.id, msg.rid, { + void api.broadcast('notify.ephemeralMessage', user.id, msg.rid, { ...msg, }); } @@ -80,10 +80,11 @@ export class AppMessageBridge extends MessageBridge { Users.findByIds(users, { fields: { _id: 1 } }) .fetch() - .forEach(({ _id }: { _id: string }) => - api.broadcast('notify.ephemeralMessage', _id, room.id, { - ...msg, - }), + .forEach( + ({ _id }: { _id: string }) => + void api.broadcast('notify.ephemeralMessage', _id, room.id, { + ...msg, + }), ); } diff --git a/apps/meteor/app/apps/server/bridges/uiInteraction.ts b/apps/meteor/app/apps/server/bridges/uiInteraction.ts index 6db79eacd98..4d2c18412df 100644 --- a/apps/meteor/app/apps/server/bridges/uiInteraction.ts +++ b/apps/meteor/app/apps/server/bridges/uiInteraction.ts @@ -20,6 +20,6 @@ export class UiInteractionBridge extends UiIntBridge { throw new Error('Invalid app provided'); } - api.broadcast('notify.uiInteraction', user.id, interaction); + void api.broadcast('notify.uiInteraction', user.id, interaction); } } diff --git a/apps/meteor/app/assets/server/assets.ts b/apps/meteor/app/assets/server/assets.ts index 930e3823b71..6fa3e2e9cd9 100644 --- a/apps/meteor/app/assets/server/assets.ts +++ b/apps/meteor/app/assets/server/assets.ts @@ -244,7 +244,7 @@ class RocketChatAssetsClass { defaultUrl: assetInstance.defaultUrl, }; - Settings.updateValueById(key, value); + void Settings.updateValueById(key, value); // eslint-disable-next-line @typescript-eslint/no-use-before-define return RocketChatAssets.processAsset(key, value); }, 200); @@ -267,7 +267,7 @@ class RocketChatAssetsClass { defaultUrl: getAssetByKey(asset).defaultUrl, }; - Settings.updateValueById(key, value); + void Settings.updateValueById(key, value); // eslint-disable-next-line @typescript-eslint/no-use-before-define RocketChatAssets.processAsset(key, value); } @@ -332,7 +332,7 @@ class RocketChatAssetsClass { export const RocketChatAssets = new RocketChatAssetsClass(); -settingsRegistry.addGroup('Assets', function () { +void settingsRegistry.addGroup('Assets', function () { this.add('Assets_SvgFavicon_Enable', true, { type: 'boolean', group: 'Assets', diff --git a/apps/meteor/app/authentication/server/startup/settings.ts b/apps/meteor/app/authentication/server/startup/settings.ts index 9d117edeeab..9b25ec5443c 100644 --- a/apps/meteor/app/authentication/server/startup/settings.ts +++ b/apps/meteor/app/authentication/server/startup/settings.ts @@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../../settings/server'; Meteor.startup(function () { - settingsRegistry.addGroup('Accounts', function () { + void settingsRegistry.addGroup('Accounts', function () { const enableQueryCollectData = { _id: 'Block_Multiple_Failed_Logins_Enabled', value: true }; this.section('Login_Attempts', function () { diff --git a/apps/meteor/app/authorization/server/methods/addUserToRole.ts b/apps/meteor/app/authorization/server/methods/addUserToRole.ts index 5b6468da736..d8ffbbcc950 100644 --- a/apps/meteor/app/authorization/server/methods/addUserToRole.ts +++ b/apps/meteor/app/authorization/server/methods/addUserToRole.ts @@ -75,7 +75,7 @@ Meteor.methods<ServerMethods>({ const add = await Roles.addUserRoles(user._id, [role._id], scope); if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type: 'added', _id: role._id, u: { diff --git a/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts b/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts index 358e68af58d..e1524042272 100644 --- a/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts +++ b/apps/meteor/app/authorization/server/methods/removeUserFromRole.ts @@ -90,9 +90,9 @@ Meteor.methods<ServerMethods>({ scope, }; if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', event); + void api.broadcast('user.roleUpdate', event); } - api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: userId }); + void api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: userId }); return remove; }, diff --git a/apps/meteor/app/autotranslate/server/settings.ts b/apps/meteor/app/autotranslate/server/settings.ts index 218683c5853..a56f22e3e88 100644 --- a/apps/meteor/app/autotranslate/server/settings.ts +++ b/apps/meteor/app/autotranslate/server/settings.ts @@ -3,14 +3,14 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../settings/server'; Meteor.startup(function () { - settingsRegistry.add('AutoTranslate_Enabled', false, { + void settingsRegistry.add('AutoTranslate_Enabled', false, { type: 'boolean', group: 'Message', section: 'AutoTranslate', public: true, }); - settingsRegistry.add('AutoTranslate_ServiceProvider', 'google-translate', { + void settingsRegistry.add('AutoTranslate_ServiceProvider', 'google-translate', { type: 'select', group: 'Message', section: 'AutoTranslate', @@ -33,7 +33,7 @@ Meteor.startup(function () { public: true, }); - settingsRegistry.add('AutoTranslate_GoogleAPIKey', '', { + void settingsRegistry.add('AutoTranslate_GoogleAPIKey', '', { type: 'string', group: 'Message', section: 'AutoTranslate_Google', @@ -51,7 +51,7 @@ Meteor.startup(function () { ], }); - settingsRegistry.add('AutoTranslate_DeepLAPIKey', '', { + void settingsRegistry.add('AutoTranslate_DeepLAPIKey', '', { type: 'string', group: 'Message', section: 'AutoTranslate_DeepL', @@ -69,7 +69,7 @@ Meteor.startup(function () { ], }); - settingsRegistry.add('AutoTranslate_MicrosoftAPIKey', '', { + void settingsRegistry.add('AutoTranslate_MicrosoftAPIKey', '', { type: 'string', group: 'Message', section: 'AutoTranslate_Microsoft', diff --git a/apps/meteor/app/bot-helpers/server/settings.ts b/apps/meteor/app/bot-helpers/server/settings.ts index 0867ef6c910..3e1e6451f5e 100644 --- a/apps/meteor/app/bot-helpers/server/settings.ts +++ b/apps/meteor/app/bot-helpers/server/settings.ts @@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../settings/server'; Meteor.startup(function () { - settingsRegistry.addGroup('Bots', function () { + void settingsRegistry.addGroup('Bots', function () { this.add('BotHelpers_userFields', '_id, name, username, emails, language, utcOffset', { type: 'string', section: 'Helpers', diff --git a/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts index 27c07ecaeac..ae4f6de0ee1 100644 --- a/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts +++ b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts @@ -217,7 +217,7 @@ const settingSavers: RoomSettingsSavers = { } if (room.teamId && room.teamMain) { - Team.update(user._id, room.teamId, { + void Team.update(user._id, room.teamId, { type: room.t === 'c' ? TEAM_TYPE.PUBLIC : TEAM_TYPE.PRIVATE, name: value, updateRoom: false, @@ -264,7 +264,7 @@ const settingSavers: RoomSettingsSavers = { if (room.teamId && room.teamMain) { const type = value === 'c' ? TEAM_TYPE.PUBLIC : TEAM_TYPE.PRIVATE; - Team.update(user._id, room.teamId, { type, updateRoom: false }); + void Team.update(user._id, room.teamId, { type, updateRoom: false }); } }, streamingOptions({ value, rid }) { @@ -313,7 +313,7 @@ const settingSavers: RoomSettingsSavers = { Rooms.saveRetentionOverrideGlobalById(rid, value); }, encrypted({ value, room, rid, user }) { - saveRoomEncrypted(rid, value, user, Boolean(room.encrypted) !== Boolean(value)); + void saveRoomEncrypted(rid, value, user, Boolean(room.encrypted) !== Boolean(value)); }, favorite({ value, rid }) { Rooms.saveFavoriteById(rid, value.favorite, value.defaultValue); diff --git a/apps/meteor/app/colors/server/settings.ts b/apps/meteor/app/colors/server/settings.ts index 0351e8974ca..75392cf5a91 100644 --- a/apps/meteor/app/colors/server/settings.ts +++ b/apps/meteor/app/colors/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.add('HexColorPreview_Enabled', true, { +void settingsRegistry.add('HexColorPreview_Enabled', true, { type: 'boolean', i18nLabel: 'Enabled', group: 'Message', diff --git a/apps/meteor/app/crowd/server/settings.ts b/apps/meteor/app/crowd/server/settings.ts index 03ad4e2c528..28a1ff4e0af 100644 --- a/apps/meteor/app/crowd/server/settings.ts +++ b/apps/meteor/app/crowd/server/settings.ts @@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../settings/server'; Meteor.startup(function () { - settingsRegistry.addGroup('AtlassianCrowd', function () { + void settingsRegistry.addGroup('AtlassianCrowd', function () { const enableQuery = { _id: 'CROWD_Enable', value: true }; const enableSyncQuery = [enableQuery, { _id: 'CROWD_Sync_User_Data', value: true }]; diff --git a/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.ts b/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.ts index 9733bf0bc34..50916863051 100644 --- a/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.ts +++ b/apps/meteor/app/custom-sounds/server/methods/deleteCustomSound.ts @@ -32,7 +32,7 @@ Meteor.methods<ServerMethods>({ RocketChatFileCustomSoundsInstance.deleteFile(`${sound._id}.${sound.extension}`); await CustomSounds.removeById(_id); - api.broadcast('notify.deleteCustomSound', { soundData: sound }); + void api.broadcast('notify.deleteCustomSound', { soundData: sound }); return true; }, diff --git a/apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.ts b/apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.ts index cca094d2988..cf573347b24 100644 --- a/apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.ts +++ b/apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.ts @@ -88,7 +88,7 @@ Meteor.methods<ServerMethods>({ if (soundData.name !== soundData.previousName) { await CustomSounds.setName(soundData._id, soundData.name); - api.broadcast('notify.updateCustomSound', { + void api.broadcast('notify.updateCustomSound', { soundData: { _id: soundData._id, name: soundData.name, diff --git a/apps/meteor/app/custom-sounds/server/startup/settings.ts b/apps/meteor/app/custom-sounds/server/startup/settings.ts index 1ae87be2b8c..cba973e7d2a 100644 --- a/apps/meteor/app/custom-sounds/server/startup/settings.ts +++ b/apps/meteor/app/custom-sounds/server/startup/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('CustomSoundsFilesystem', function () { +void settingsRegistry.addGroup('CustomSoundsFilesystem', function () { this.add('CustomSounds_Storage_Type', 'GridFS', { type: 'select', values: [ diff --git a/apps/meteor/app/discussion/server/config.ts b/apps/meteor/app/discussion/server/config.ts index feb3c5a040b..a664e72e929 100644 --- a/apps/meteor/app/discussion/server/config.ts +++ b/apps/meteor/app/discussion/server/config.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('Discussion', function () { +void settingsRegistry.addGroup('Discussion', function () { // the channel for which discussions are created if none is explicitly chosen this.add('Discussion_enabled', true, { @@ -16,7 +16,7 @@ const globalQuery = { value: true, }; -settingsRegistry.add('RetentionPolicy_DoNotPruneDiscussion', true, { +void settingsRegistry.add('RetentionPolicy_DoNotPruneDiscussion', true, { group: 'RetentionPolicy', section: 'Global Policy', type: 'boolean', @@ -26,7 +26,7 @@ settingsRegistry.add('RetentionPolicy_DoNotPruneDiscussion', true, { enableQuery: globalQuery, }); -settingsRegistry.add('RetentionPolicy_DoNotPruneThreads', true, { +void settingsRegistry.add('RetentionPolicy_DoNotPruneThreads', true, { group: 'RetentionPolicy', section: 'Global Policy', type: 'boolean', diff --git a/apps/meteor/app/dolphin/server/startup.ts b/apps/meteor/app/dolphin/server/startup.ts index 5f595846f04..befa09ddd47 100644 --- a/apps/meteor/app/dolphin/server/startup.ts +++ b/apps/meteor/app/dolphin/server/startup.ts @@ -1,32 +1,32 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.add('Accounts_OAuth_Dolphin_URL', '', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_URL', '', { type: 'string', group: 'OAuth', public: true, section: 'Dolphin', i18nLabel: 'URL', }); -settingsRegistry.add('Accounts_OAuth_Dolphin', false, { +void settingsRegistry.add('Accounts_OAuth_Dolphin', false, { type: 'boolean', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_Enable', }); -settingsRegistry.add('Accounts_OAuth_Dolphin_id', '', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_id', '', { type: 'string', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_id', }); -settingsRegistry.add('Accounts_OAuth_Dolphin_secret', '', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_secret', '', { type: 'string', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_Secret', secret: true, }); -settingsRegistry.add('Accounts_OAuth_Dolphin_login_style', 'redirect', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_login_style', 'redirect', { type: 'select', group: 'OAuth', section: 'Dolphin', @@ -38,21 +38,21 @@ settingsRegistry.add('Accounts_OAuth_Dolphin_login_style', 'redirect', { { key: '', i18nLabel: 'Default' }, ], }); -settingsRegistry.add('Accounts_OAuth_Dolphin_button_label_text', '', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_button_label_text', '', { type: 'string', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Text', persistent: true, }); -settingsRegistry.add('Accounts_OAuth_Dolphin_button_label_color', '#FFFFFF', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_button_label_color', '#FFFFFF', { type: 'string', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Color', persistent: true, }); -settingsRegistry.add('Accounts_OAuth_Dolphin_button_color', '#1d74f5', { +void settingsRegistry.add('Accounts_OAuth_Dolphin_button_color', '#1d74f5', { type: 'string', group: 'OAuth', section: 'Dolphin', diff --git a/apps/meteor/app/drupal/server/startup.ts b/apps/meteor/app/drupal/server/startup.ts index 5994e608e2b..1b7e4ee1580 100644 --- a/apps/meteor/app/drupal/server/startup.ts +++ b/apps/meteor/app/drupal/server/startup.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('Drupal', function () { const enableQuery = { _id: 'Accounts_OAuth_Drupal', diff --git a/apps/meteor/app/e2e/client/tabbar.ts b/apps/meteor/app/e2e/client/tabbar.ts index 78b2b9a9254..dac750540d4 100644 --- a/apps/meteor/app/e2e/client/tabbar.ts +++ b/apps/meteor/app/e2e/client/tabbar.ts @@ -18,7 +18,7 @@ addAction('e2e', ({ room }) => { const toggleE2E = useEndpoint('POST', '/v1/rooms.saveRoomSettings'); const action = useMutableCallback(() => { - toggleE2E({ rid: room._id, encrypted: !room.encrypted }); + void toggleE2E({ rid: room._id, encrypted: !room.encrypted }); }); const enabledOnRoom = !!room.encrypted; diff --git a/apps/meteor/app/e2e/server/index.js b/apps/meteor/app/e2e/server/index.js index 080a32d8119..b0c9804beab 100644 --- a/apps/meteor/app/e2e/server/index.js +++ b/apps/meteor/app/e2e/server/index.js @@ -15,7 +15,7 @@ import './methods/requestSubscriptionKeys'; callbacks.add( 'afterJoinRoom', (user, room) => { - api.broadcast('notify.e2e.keyRequest', room._id, room.e2eKeyId); + void api.broadcast('notify.e2e.keyRequest', room._id, room.e2eKeyId); }, callbacks.priority.MEDIUM, 'e2e', diff --git a/apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js b/apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js index 2dea12b1e0c..c07f6772909 100644 --- a/apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js +++ b/apps/meteor/app/e2e/server/methods/requestSubscriptionKeys.js @@ -27,7 +27,7 @@ Meteor.methods({ const rooms = Rooms.find(query); rooms.forEach((room) => { - api.broadcast('notify.e2e.keyRequest', room._id, room.e2eKeyId); + void api.broadcast('notify.e2e.keyRequest', room._id, room.e2eKeyId); }); return true; diff --git a/apps/meteor/app/e2e/server/settings.ts b/apps/meteor/app/e2e/server/settings.ts index 009bedf1060..7bea8de753b 100644 --- a/apps/meteor/app/e2e/server/settings.ts +++ b/apps/meteor/app/e2e/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('E2E Encryption', function () { +void settingsRegistry.addGroup('E2E Encryption', function () { this.add('E2E_Enable', false, { type: 'boolean', i18nLabel: 'Enabled', diff --git a/apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js b/apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js index 61c68029271..45ec8cfb5ae 100644 --- a/apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js +++ b/apps/meteor/app/emoji-custom/server/methods/deleteEmojiCustom.js @@ -20,7 +20,7 @@ Meteor.methods({ RocketChatFileEmojiCustomInstance.deleteFile(encodeURIComponent(`${emoji.name}.${emoji.extension}`)); await EmojiCustom.removeById(emojiID); - api.broadcast('emoji.deleteCustom', emoji); + void api.broadcast('emoji.deleteCustom', emoji); return true; }, diff --git a/apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js b/apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js index fa12e3da592..c8f77d7e759 100644 --- a/apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js +++ b/apps/meteor/app/emoji-custom/server/methods/insertOrUpdateEmoji.js @@ -96,7 +96,7 @@ Meteor.methods({ const _id = (await EmojiCustom.create(createEmoji)).insertedId; - api.broadcast('emoji.updateCustom', createEmoji); + void api.broadcast('emoji.updateCustom', createEmoji); return _id; } @@ -138,7 +138,7 @@ Meteor.methods({ await EmojiCustom.setAliases(emojiData._id, []); } - api.broadcast('emoji.updateCustom', emojiData); + void api.broadcast('emoji.updateCustom', emojiData); return true; }, diff --git a/apps/meteor/app/emoji-custom/server/startup/settings.ts b/apps/meteor/app/emoji-custom/server/startup/settings.ts index a1b4614630f..4234c0e1e70 100644 --- a/apps/meteor/app/emoji-custom/server/startup/settings.ts +++ b/apps/meteor/app/emoji-custom/server/startup/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('EmojiCustomFilesystem', function () { +void settingsRegistry.addGroup('EmojiCustomFilesystem', function () { this.add('EmojiUpload_Storage_Type', 'GridFS', { type: 'select', values: [ diff --git a/apps/meteor/app/error-handler/server/startup/settings.ts b/apps/meteor/app/error-handler/server/startup/settings.ts index 4ec24e3db1c..2c81e5f83d4 100644 --- a/apps/meteor/app/error-handler/server/startup/settings.ts +++ b/apps/meteor/app/error-handler/server/startup/settings.ts @@ -1,5 +1,5 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('Logs', function () { +void settingsRegistry.addGroup('Logs', function () { this.add('Log_Exceptions_to_Channel', '', { type: 'string' }); }); diff --git a/apps/meteor/app/federation/server/endpoints/dispatch.js b/apps/meteor/app/federation/server/endpoints/dispatch.js index 84db0eebf06..1324777254b 100644 --- a/apps/meteor/app/federation/server/endpoints/dispatch.js +++ b/apps/meteor/app/federation/server/endpoints/dispatch.js @@ -327,7 +327,7 @@ const eventHandlers = { Messages.removeById(messageId); // Notify the room - api.broadcast('notify.deleteMessage', roomId, { _id: messageId }); + void api.broadcast('notify.deleteMessage', roomId, { _id: messageId }); } return eventResult; diff --git a/apps/meteor/app/federation/server/startup/settings.ts b/apps/meteor/app/federation/server/startup/settings.ts index fa1c00eaa36..728a01843c3 100644 --- a/apps/meteor/app/federation/server/startup/settings.ts +++ b/apps/meteor/app/federation/server/startup/settings.ts @@ -9,7 +9,7 @@ import { enableCallbacks, disableCallbacks } from '../lib/callbacks'; import { setupLogger } from '../lib/logger'; import { STATUS_ENABLED, STATUS_REGISTERING, STATUS_ERROR_REGISTERING, STATUS_DISABLED } from '../constants'; -settingsRegistry.addGroup('Federation', function () { +void settingsRegistry.addGroup('Federation', function () { this.section('Rocket.Chat Federation', async function () { this.add('FEDERATION_Enabled', false, { type: 'boolean', diff --git a/apps/meteor/app/file-upload/server/startup/settings.ts b/apps/meteor/app/file-upload/server/startup/settings.ts index af6375e73be..9de61a67264 100644 --- a/apps/meteor/app/file-upload/server/startup/settings.ts +++ b/apps/meteor/app/file-upload/server/startup/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('FileUpload', function () { +void settingsRegistry.addGroup('FileUpload', function () { this.add('FileUpload_Enabled', true, { type: 'boolean', public: true, diff --git a/apps/meteor/app/github-enterprise/server/startup.ts b/apps/meteor/app/github-enterprise/server/startup.ts index aebad2aa8cb..35d33297861 100644 --- a/apps/meteor/app/github-enterprise/server/startup.ts +++ b/apps/meteor/app/github-enterprise/server/startup.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('GitHub Enterprise', function () { const enableQuery = { _id: 'Accounts_OAuth_GitHub_Enterprise', diff --git a/apps/meteor/app/gitlab/server/startup.ts b/apps/meteor/app/gitlab/server/startup.ts index 217ea1f5398..7d9246086cf 100644 --- a/apps/meteor/app/gitlab/server/startup.ts +++ b/apps/meteor/app/gitlab/server/startup.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('GitLab', function () { const enableQuery = { _id: 'Accounts_OAuth_Gitlab', diff --git a/apps/meteor/app/iframe-login/server/iframe_rocketchat.ts b/apps/meteor/app/iframe-login/server/iframe_rocketchat.ts index 149749934f9..851a489d077 100644 --- a/apps/meteor/app/iframe-login/server/iframe_rocketchat.ts +++ b/apps/meteor/app/iframe-login/server/iframe_rocketchat.ts @@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../settings/server'; Meteor.startup(function () { - settingsRegistry.addGroup('Accounts', function () { + void settingsRegistry.addGroup('Accounts', function () { this.section('Iframe', function () { this.add('Accounts_iframe_enabled', false, { type: 'boolean', public: true }); this.add('Accounts_iframe_url', '', { type: 'string', public: true }); diff --git a/apps/meteor/app/invites/server/functions/findOrCreateInvite.js b/apps/meteor/app/invites/server/functions/findOrCreateInvite.js index 93d82da0106..222ce04ce2e 100644 --- a/apps/meteor/app/invites/server/functions/findOrCreateInvite.js +++ b/apps/meteor/app/invites/server/functions/findOrCreateInvite.js @@ -100,7 +100,7 @@ export const findOrCreateInvite = async (userId, invite) => { await Invites.insertOne(createInvite); - api.broadcast('notify.updateInvites', userId, { invite: createInvite }); + void api.broadcast('notify.updateInvites', userId, { invite: createInvite }); createInvite.url = getInviteUrl(createInvite); return createInvite; diff --git a/apps/meteor/app/irc/server/irc-settings.ts b/apps/meteor/app/irc/server/irc-settings.ts index 6909816ab2e..efde619483f 100644 --- a/apps/meteor/app/irc/server/irc-settings.ts +++ b/apps/meteor/app/irc/server/irc-settings.ts @@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../settings/server'; Meteor.startup(function () { - settingsRegistry.addGroup('IRC_Federation', function () { + void settingsRegistry.addGroup('IRC_Federation', function () { this.add('IRC_Enabled', false, { type: 'boolean', i18nLabel: 'Enabled', diff --git a/apps/meteor/app/katex/server/settings.ts b/apps/meteor/app/katex/server/settings.ts index 2d9077e8e39..d86b56d9f1f 100644 --- a/apps/meteor/app/katex/server/settings.ts +++ b/apps/meteor/app/katex/server/settings.ts @@ -7,14 +7,14 @@ Meteor.startup(function () { _id: 'Katex_Enabled', value: true, }; - settingsRegistry.add('Katex_Enabled', true, { + void settingsRegistry.add('Katex_Enabled', true, { type: 'boolean', group: 'Message', section: 'Katex', public: true, i18nDescription: 'Katex_Enabled_Description', }); - settingsRegistry.add('Katex_Parenthesis_Syntax', true, { + void settingsRegistry.add('Katex_Parenthesis_Syntax', true, { type: 'boolean', group: 'Message', section: 'Katex', @@ -22,7 +22,7 @@ Meteor.startup(function () { enableQuery, i18nDescription: 'Katex_Parenthesis_Syntax_Description', }); - return settingsRegistry.add('Katex_Dollar_Syntax', false, { + return void settingsRegistry.add('Katex_Dollar_Syntax', false, { type: 'boolean', group: 'Message', section: 'Katex', diff --git a/apps/meteor/app/lib/server/functions/addOAuthService.ts b/apps/meteor/app/lib/server/functions/addOAuthService.ts index 089cce18ced..b253f655533 100644 --- a/apps/meteor/app/lib/server/functions/addOAuthService.ts +++ b/apps/meteor/app/lib/server/functions/addOAuthService.ts @@ -7,28 +7,28 @@ import { settingsRegistry } from '../../../settings/server'; export function addOAuthService(name: string, values: { [k: string]: string | boolean | undefined } = {}): void { name = name.toLowerCase().replace(/[^a-z0-9_]/g, ''); name = capitalize(name); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}`, values.enabled || false, { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}`, values.enabled || false, { type: 'boolean', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Enable', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-url`, values.serverURL || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-url`, values.serverURL || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'URL', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-token_path`, values.tokenPath || '/oauth/token', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-token_path`, values.tokenPath || '/oauth/token', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Token_Path', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-token_sent_via`, values.tokenSentVia || 'payload', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-token_sent_via`, values.tokenSentVia || 'payload', { type: 'select', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -39,7 +39,7 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo { key: 'payload', i18nLabel: 'Payload' }, ], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-identity_token_sent_via`, values.identityTokenSentVia || 'default', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-identity_token_sent_via`, values.identityTokenSentVia || 'default', { type: 'select', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -51,49 +51,49 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo { key: 'payload', i18nLabel: 'Payload' }, ], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-identity_path`, values.identityPath || '/me', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-identity_path`, values.identityPath || '/me', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Identity_Path', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-authorize_path`, values.authorizePath || '/oauth/authorize', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-authorize_path`, values.authorizePath || '/oauth/authorize', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Authorize_Path', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-scope`, values.scope || 'openid', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-scope`, values.scope || 'openid', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Scope', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-access_token_param`, values.accessTokenParam || 'access_token', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-access_token_param`, values.accessTokenParam || 'access_token', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Access_Token_Param', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-id`, values.clientId || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-id`, values.clientId || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_id', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-secret`, values.clientSecret || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-secret`, values.clientSecret || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Secret', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-login_style`, values.loginStyle || 'popup', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-login_style`, values.loginStyle || 'popup', { type: 'select', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -105,28 +105,28 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo { key: '', i18nLabel: 'Default' }, ], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-button_label_text`, values.buttonLabelText || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-button_label_text`, values.buttonLabelText || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Text', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-button_label_color`, values.buttonLabelColor || '#FFFFFF', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-button_label_color`, values.buttonLabelColor || '#FFFFFF', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Color', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-button_color`, values.buttonColor || '#1d74f5', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-button_color`, values.buttonColor || '#1d74f5', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Button_Color', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-key_field`, values.keyField || 'username', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-key_field`, values.keyField || 'username', { type: 'select', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -137,35 +137,35 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo { key: 'email', i18nLabel: 'Email' }, ], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-username_field`, values.usernameField || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-username_field`, values.usernameField || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Username_Field', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-email_field`, values.emailField || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-email_field`, values.emailField || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Email_Field', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-name_field`, values.nameField || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-name_field`, values.nameField || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Name_Field', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-avatar_field`, values.avatarField || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-avatar_field`, values.avatarField || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Avatar_Field', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-roles_claim`, values.rolesClaim || 'roles', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-roles_claim`, values.rolesClaim || 'roles', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -174,7 +174,7 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo invalidValue: 'roles', modules: ['oauth-enterprise'], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-groups_claim`, values.groupsClaim || 'groups', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-groups_claim`, values.groupsClaim || 'groups', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -184,14 +184,14 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo modules: ['oauth-enterprise'], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-channels_admin`, values.channelsAdmin || 'rocket.cat', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-channels_admin`, values.channelsAdmin || 'rocket.cat', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Channel_Admin', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-map_channels`, values.mapChannels || false, { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-map_channels`, values.mapChannels || false, { type: 'boolean', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -200,7 +200,7 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo invalidValue: false, modules: ['oauth-enterprise'], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-merge_roles`, values.mergeRoles || false, { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-merge_roles`, values.mergeRoles || false, { type: 'boolean', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -209,7 +209,7 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo invalidValue: false, modules: ['oauth-enterprise'], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-roles_to_sync`, values.rolesToSync || '', { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-roles_to_sync`, values.rolesToSync || '', { type: 'string', group: 'OAuth', section: `Custom OAuth: ${name}`, @@ -223,21 +223,21 @@ export function addOAuthService(name: string, values: { [k: string]: string | bo invalidValue: '', modules: ['oauth-enterprise'], }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-merge_users`, values.mergeUsers || false, { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-merge_users`, values.mergeUsers || false, { type: 'boolean', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Merge_Users', persistent: true, }); - settingsRegistry.add(`Accounts_OAuth_Custom-${name}-show_button`, values.showButton || true, { + void settingsRegistry.add(`Accounts_OAuth_Custom-${name}-show_button`, values.showButton || true, { type: 'boolean', group: 'OAuth', section: `Custom OAuth: ${name}`, i18nLabel: 'Accounts_OAuth_Custom_Show_Button_On_Login_Page', persistent: true, }); - settingsRegistry.add( + void settingsRegistry.add( `Accounts_OAuth_Custom-${name}-groups_channel_map`, values.channelsMap || '{\n\t"rocket-admin": "admin",\n\t"tech-support": "support"\n}', { diff --git a/apps/meteor/app/lib/server/functions/addUserToRoom.ts b/apps/meteor/app/lib/server/functions/addUserToRoom.ts index e871fdd91e8..5e37c148f79 100644 --- a/apps/meteor/app/lib/server/functions/addUserToRoom.ts +++ b/apps/meteor/app/lib/server/functions/addUserToRoom.ts @@ -107,7 +107,7 @@ export const addUserToRoom = function ( // Keep the current event callbacks.run('afterJoinRoom', userToBeAdded, room); - Apps.triggerEvent(AppEvents.IPostRoomUserJoined, room, userToBeAdded, inviter); + void Apps.triggerEvent(AppEvents.IPostRoomUserJoined, room, userToBeAdded, inviter); }); } diff --git a/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts b/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts index c9280d06bd8..34d1613c4bc 100644 --- a/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts +++ b/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts @@ -70,7 +70,7 @@ export const cleanRoomHistory = function ({ const count = Messages.removeByIdPinnedTimestampLimitAndUsers(rid, excludePinned, ignoreDiscussion, ts, limit, fromUsers, ignoreThreads); if (count) { Rooms.resetLastMessageById(rid); - api.broadcast('notify.deleteMessageBulk', rid, { + void api.broadcast('notify.deleteMessageBulk', rid, { rid, excludePinned, ignoreDiscussion, diff --git a/apps/meteor/app/lib/server/functions/createDirectRoom.ts b/apps/meteor/app/lib/server/functions/createDirectRoom.ts index 1fe0bef8dd6..09718f72e57 100644 --- a/apps/meteor/app/lib/server/functions/createDirectRoom.ts +++ b/apps/meteor/app/lib/server/functions/createDirectRoom.ts @@ -161,7 +161,7 @@ export const createDirectRoom = function ( callbacks.run('afterCreateDirectRoom', insertedRoom, { members: roomMembers, creatorId: options?.creator }); - Apps.triggerEvent('IPostRoomCreate', insertedRoom); + void Apps.triggerEvent('IPostRoomCreate', insertedRoom); } return { diff --git a/apps/meteor/app/lib/server/functions/createRoom.ts b/apps/meteor/app/lib/server/functions/createRoom.ts index 757aa62b4e0..3421e4a0a44 100644 --- a/apps/meteor/app/lib/server/functions/createRoom.ts +++ b/apps/meteor/app/lib/server/functions/createRoom.ts @@ -176,7 +176,7 @@ export const createRoom = <T extends RoomType>( callbacks.runAsync('federation.afterCreateFederatedRoom', room, { owner, originalMemberList: members as string[] }); } - Apps.triggerEvent('IPostRoomCreate', room); + void Apps.triggerEvent('IPostRoomCreate', room); return { rid: room._id, // backwards compatible diff --git a/apps/meteor/app/lib/server/functions/deleteMessage.ts b/apps/meteor/app/lib/server/functions/deleteMessage.ts index 87841dc6229..37e9df7d3d0 100644 --- a/apps/meteor/app/lib/server/functions/deleteMessage.ts +++ b/apps/meteor/app/lib/server/functions/deleteMessage.ts @@ -65,10 +65,10 @@ export const deleteMessage = async function (message: IMessage, user: IUser): Pr if (showDeletedStatus) { Messages.setAsDeletedByIdAndUser(message._id, user); } else { - api.broadcast('notify.deleteMessage', message.rid, { _id: message._id }); + void api.broadcast('notify.deleteMessage', message.rid, { _id: message._id }); } if (bridges) { - bridges.getListenerBridge().messageEvent('IPostMessageDeleted', deletedMsg, user); + void bridges.getListenerBridge().messageEvent('IPostMessageDeleted', deletedMsg, user); } }; diff --git a/apps/meteor/app/lib/server/functions/deleteUser.ts b/apps/meteor/app/lib/server/functions/deleteUser.ts index b6e20cd1798..703738b6f59 100644 --- a/apps/meteor/app/lib/server/functions/deleteUser.ts +++ b/apps/meteor/app/lib/server/functions/deleteUser.ts @@ -77,7 +77,7 @@ export async function deleteUser(userId: string, confirmRelinquish = false): Pro // Don't broadcast user.deleted for Erasure Type of 'Keep' so that messages don't disappear from logged in sessions if (messageErasureType !== 'Keep') { - api.broadcast('user.deleted', user); + void api.broadcast('user.deleted', user); } } diff --git a/apps/meteor/app/lib/server/functions/notifications/desktop.js b/apps/meteor/app/lib/server/functions/notifications/desktop.js index ee2e56cd993..b1962ac1321 100644 --- a/apps/meteor/app/lib/server/functions/notifications/desktop.js +++ b/apps/meteor/app/lib/server/functions/notifications/desktop.js @@ -37,7 +37,7 @@ export function notifyDesktopUser({ userId, user, message, room, duration, notif metrics.notificationsSent.inc({ notification_type: 'desktop' }); - api.broadcast('notify.desktop', userId, payload); + void api.broadcast('notify.desktop', userId, payload); } export function shouldNotifyDesktop({ diff --git a/apps/meteor/app/lib/server/functions/setRealName.ts b/apps/meteor/app/lib/server/functions/setRealName.ts index af6cafff2f2..423364b1446 100644 --- a/apps/meteor/app/lib/server/functions/setRealName.ts +++ b/apps/meteor/app/lib/server/functions/setRealName.ts @@ -34,13 +34,13 @@ export const _setRealName = function (userId: string, name: string, fullUser: IU user.name = name; if (settings.get('UI_Use_Real_Name') === true) { - api.broadcast('user.nameChanged', { + void api.broadcast('user.nameChanged', { _id: user._id, name: user.name, username: user.username, }); } - api.broadcast('user.realNameChanged', { + void api.broadcast('user.realNameChanged', { _id: user._id, name, username: user.username, diff --git a/apps/meteor/app/lib/server/functions/setRoomAvatar.ts b/apps/meteor/app/lib/server/functions/setRoomAvatar.ts index 87120782eb3..8665aa74abc 100644 --- a/apps/meteor/app/lib/server/functions/setRoomAvatar.ts +++ b/apps/meteor/app/lib/server/functions/setRoomAvatar.ts @@ -15,7 +15,7 @@ export const setRoomAvatar = async function (rid: string, dataURI: string, user: if (!dataURI) { fileStore.deleteByRoomId(rid); Messages.createRoomSettingsChangedWithTypeRoomIdMessageAndUser('room_changed_avatar', rid, '', user); - api.broadcast('room.avatarUpdate', { _id: rid }); + void api.broadcast('room.avatarUpdate', { _id: rid }); return Rooms.unsetAvatarData(rid); } @@ -43,7 +43,7 @@ export const setRoomAvatar = async function (rid: string, dataURI: string, user: Meteor.setTimeout(function () { Rooms.setAvatarData(rid, 'upload', result.etag); Messages.createRoomSettingsChangedWithTypeRoomIdMessageAndUser('room_changed_avatar', rid, '', user); - api.broadcast('room.avatarUpdate', { _id: rid, avatarETag: result.etag }); + void api.broadcast('room.avatarUpdate', { _id: rid, avatarETag: result.etag }); }, 500); }); }; diff --git a/apps/meteor/app/lib/server/functions/setStatusText.ts b/apps/meteor/app/lib/server/functions/setStatusText.ts index b6b6e69a043..cff24e56a94 100644 --- a/apps/meteor/app/lib/server/functions/setStatusText.ts +++ b/apps/meteor/app/lib/server/functions/setStatusText.ts @@ -28,7 +28,7 @@ async function _setStatusTextPromise(userId: string, statusText: string): Promis await Users.updateStatusText(user._id, statusText); const { _id, username, status, name, roles } = user; - api.broadcast('presence.status', { + void api.broadcast('presence.status', { user: { _id, username, status, statusText, name, roles }, previousStatus: status, }); diff --git a/apps/meteor/app/lib/server/functions/setUserAvatar.ts b/apps/meteor/app/lib/server/functions/setUserAvatar.ts index f25745dc389..e25fb6aae11 100644 --- a/apps/meteor/app/lib/server/functions/setUserAvatar.ts +++ b/apps/meteor/app/lib/server/functions/setUserAvatar.ts @@ -112,7 +112,7 @@ export function setUserAvatar( Meteor.setTimeout(function () { Users.setAvatarData(user._id, service, avatarETag); - api.broadcast('user.avatarUpdate', { + void api.broadcast('user.avatarUpdate', { username: user.username, avatarETag, }); diff --git a/apps/meteor/app/lib/server/functions/setUsername.ts b/apps/meteor/app/lib/server/functions/setUsername.ts index bdb59f9cdf9..544d5134d12 100644 --- a/apps/meteor/app/lib/server/functions/setUsername.ts +++ b/apps/meteor/app/lib/server/functions/setUsername.ts @@ -81,7 +81,7 @@ export const _setUsername = function (userId: string, u: string, fullUser: IUser } } - api.broadcast('user.nameChanged', { + void api.broadcast('user.nameChanged', { _id: user._id, name: user.name, username: user.username, diff --git a/apps/meteor/app/lib/server/functions/updateMessage.ts b/apps/meteor/app/lib/server/functions/updateMessage.ts index 52c93c9837a..a548a6d123f 100644 --- a/apps/meteor/app/lib/server/functions/updateMessage.ts +++ b/apps/meteor/app/lib/server/functions/updateMessage.ts @@ -61,7 +61,7 @@ export const updateMessage = function (message: IMessage, user: IUser, originalM if (Apps?.isLoaded()) { // This returns a promise, but it won't mutate anything about the message // so, we don't really care if it is successful or fails - Apps.getBridges()?.getListenerBridge().messageEvent('IPostMessageUpdated', message); + void Apps.getBridges()?.getListenerBridge().messageEvent('IPostMessageUpdated', message); } Meteor.defer(function () { diff --git a/apps/meteor/app/lib/server/methods/addUsersToRoom.js b/apps/meteor/app/lib/server/methods/addUsersToRoom.js index 0a1428c4587..144eed808ba 100644 --- a/apps/meteor/app/lib/server/methods/addUsersToRoom.js +++ b/apps/meteor/app/lib/server/methods/addUsersToRoom.js @@ -82,7 +82,7 @@ Meteor.methods({ if (!subscription) { addUserToRoom(data.rid, newUser || username, user); } else { - api.broadcast('notify.ephemeralMessage', userId, data.rid, { + void api.broadcast('notify.ephemeralMessage', userId, data.rid, { msg: TAPi18n.__( 'Username_is_already_in_here', { diff --git a/apps/meteor/app/lib/server/methods/filterATAllTag.js b/apps/meteor/app/lib/server/methods/filterATAllTag.js index df2692918cb..d24a21e3e3e 100644 --- a/apps/meteor/app/lib/server/methods/filterATAllTag.js +++ b/apps/meteor/app/lib/server/methods/filterATAllTag.js @@ -27,7 +27,7 @@ callbacks.add( // Add a notification to the chat, informing the user that this // action is not allowed. - api.broadcast('notify.ephemeralMessage', message.u._id, message.rid, { + void api.broadcast('notify.ephemeralMessage', message.u._id, message.rid, { msg: TAPi18n.__('error-action-not-allowed', { action }, language), }); diff --git a/apps/meteor/app/lib/server/methods/filterATHereTag.js b/apps/meteor/app/lib/server/methods/filterATHereTag.js index bf7137207cd..0afc62b7df6 100644 --- a/apps/meteor/app/lib/server/methods/filterATHereTag.js +++ b/apps/meteor/app/lib/server/methods/filterATHereTag.js @@ -27,7 +27,7 @@ callbacks.add( // Add a notification to the chat, informing the user that this // action is not allowed. - api.broadcast('notify.ephemeralMessage', message.u._id, message.rid, { + void api.broadcast('notify.ephemeralMessage', message.u._id, message.rid, { msg: TAPi18n.__('error-action-not-allowed', { action }, language), }); diff --git a/apps/meteor/app/lib/server/methods/sendMessage.ts b/apps/meteor/app/lib/server/methods/sendMessage.ts index f66c31c036c..5fc3ffedc89 100644 --- a/apps/meteor/app/lib/server/methods/sendMessage.ts +++ b/apps/meteor/app/lib/server/methods/sendMessage.ts @@ -79,7 +79,7 @@ export function executeSendMessage(uid: IUser['_id'], message: AtLeast<IMessage, SystemLogger.error({ msg: 'Error sending message:', err }); const errorMessage = typeof err === 'string' ? err : err.error || err.message; - api.broadcast('notify.ephemeralMessage', uid, message.rid, { + void api.broadcast('notify.ephemeralMessage', uid, message.rid, { msg: TAPi18n.__(errorMessage, {}, user.language), }); diff --git a/apps/meteor/app/lib/server/startup/email.ts b/apps/meteor/app/lib/server/startup/email.ts index d45af06306d..baf64fd2bcd 100644 --- a/apps/meteor/app/lib/server/startup/email.ts +++ b/apps/meteor/app/lib/server/startup/email.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('Email', function () { +void settingsRegistry.addGroup('Email', function () { this.section('Style', function () { this.add('email_plain_text_only', false, { type: 'boolean', diff --git a/apps/meteor/app/lib/server/startup/settings.ts b/apps/meteor/app/lib/server/startup/settings.ts index 27f59f9bc94..ba1408187e6 100644 --- a/apps/meteor/app/lib/server/startup/settings.ts +++ b/apps/meteor/app/lib/server/startup/settings.ts @@ -5,11 +5,11 @@ import './email'; import { MessageTypesValues } from '../../lib/MessageTypes'; // Insert server unique id if it doesn't exist -settingsRegistry.add('uniqueID', process.env.DEPLOYMENT_ID || Random.id(), { +void settingsRegistry.add('uniqueID', process.env.DEPLOYMENT_ID || Random.id(), { public: true, }); -settingsRegistry.add('Initial_Channel_Created', false, { +void settingsRegistry.add('Initial_Channel_Created', false, { type: 'boolean', hidden: true, }); @@ -17,7 +17,7 @@ settingsRegistry.add('Initial_Channel_Created', false, { // When you define a setting and want to add a description, you don't need to automatically define the i18nDescription // if you add a node to the i18n.json with the same setting name but with `_Description` it will automatically work. -settingsRegistry.addGroup('Accounts', function () { +void settingsRegistry.addGroup('Accounts', function () { this.add('Accounts_AllowAnonymousRead', false, { type: 'boolean', public: true, @@ -660,7 +660,7 @@ settingsRegistry.addGroup('Accounts', function () { }); }); -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('Facebook', function () { const enableQuery = { _id: 'Accounts_OAuth_Facebook', @@ -817,7 +817,7 @@ settingsRegistry.addGroup('OAuth', function () { }); }); -settingsRegistry.addGroup('General', function () { +void settingsRegistry.addGroup('General', function () { this.add('Show_Setup_Wizard', 'pending', { type: 'select', public: true, @@ -1151,7 +1151,7 @@ settingsRegistry.addGroup('General', function () { }); }); -settingsRegistry.addGroup('Message', function () { +void settingsRegistry.addGroup('Message', function () { this.section('Message_Attachments', function () { this.add('Message_Attachments_Thumbnails_Enabled', true, { type: 'boolean', @@ -1379,7 +1379,7 @@ settingsRegistry.addGroup('Message', function () { }); }); -settingsRegistry.addGroup('Meta', function () { +void settingsRegistry.addGroup('Meta', function () { this.add('Meta_language', '', { type: 'string', }); @@ -1405,7 +1405,7 @@ settingsRegistry.addGroup('Meta', function () { }); }); -settingsRegistry.addGroup('Mobile', function () { +void settingsRegistry.addGroup('Mobile', function () { this.add('Allow_Save_Media_to_Gallery', true, { type: 'boolean', public: true, @@ -1436,7 +1436,7 @@ const pushEnabledWithoutGateway = [ }, ]; -settingsRegistry.addGroup('Push', function () { +void settingsRegistry.addGroup('Push', function () { this.add('Push_enable', true, { type: 'boolean', public: true, @@ -1556,7 +1556,7 @@ settingsRegistry.addGroup('Push', function () { }); }); -settingsRegistry.addGroup('Layout', function () { +void settingsRegistry.addGroup('Layout', function () { this.section('Login', function () { this.add('Layout_Login_Hide_Logo', false, { type: 'boolean', @@ -1766,7 +1766,7 @@ settingsRegistry.addGroup('Layout', function () { }); }); -settingsRegistry.addGroup('Logs', function () { +void settingsRegistry.addGroup('Logs', function () { this.add('Log_Level', '0', { type: 'select', values: [ @@ -1841,7 +1841,7 @@ settingsRegistry.addGroup('Logs', function () { }); }); -settingsRegistry.addGroup('Setup_Wizard', function () { +void settingsRegistry.addGroup('Setup_Wizard', function () { this.section('Organization_Info', function () { this.add('Organization_Type', '', { type: 'select', @@ -3190,7 +3190,7 @@ settingsRegistry.addGroup('Setup_Wizard', function () { }); }); -settingsRegistry.addGroup('Rate Limiter', function () { +void settingsRegistry.addGroup('Rate Limiter', function () { this.section('DDP_Rate_Limiter', function () { this.add('DDP_Rate_Limit_IP_Enabled', true, { type: 'boolean' }); this.add('DDP_Rate_Limit_IP_Requests_Allowed', 120000, { @@ -3267,7 +3267,7 @@ settingsRegistry.addGroup('Rate Limiter', function () { }); }); -settingsRegistry.addGroup('Troubleshoot', function () { +void settingsRegistry.addGroup('Troubleshoot', function () { this.add('Troubleshoot_Disable_Notifications', false, { type: 'boolean', alert: 'Troubleshoot_Disable_Notifications_Alert', @@ -3312,7 +3312,7 @@ settingsRegistry.addGroup('Troubleshoot', function () { }); }); -settingsRegistry.addGroup('Call_Center', function () { +void settingsRegistry.addGroup('Call_Center', function () { // TODO: Check with the backend team if an i18nPlaceholder is possible this.with({ tab: 'Settings' }, function () { this.section('General_Settings', function () { diff --git a/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts b/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts index 0b4f55d9d83..4939aa0ce5b 100644 --- a/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts +++ b/apps/meteor/app/lib/server/startup/settingsOnLoadDirectReply.ts @@ -40,4 +40,4 @@ const startEmailInterceptor = _.debounce(async function () { settings.watchByRegex(/^Direct_Reply_.+/, startEmailInterceptor); -startEmailInterceptor(); +void startEmailInterceptor(); diff --git a/apps/meteor/app/livechat/server/config.ts b/apps/meteor/app/livechat/server/config.ts index 7410977f36f..d312a2a865f 100644 --- a/apps/meteor/app/livechat/server/config.ts +++ b/apps/meteor/app/livechat/server/config.ts @@ -6,7 +6,7 @@ import { settingsRegistry } from '../../settings/server'; const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true }; Meteor.startup(function () { - settingsRegistry.addGroup('Omnichannel', function () { + void settingsRegistry.addGroup('Omnichannel', function () { this.add('Livechat_enabled', true, { type: 'boolean', group: 'Omnichannel', @@ -369,7 +369,7 @@ Meteor.startup(function () { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.addGroup('Omnichannel', function () { + void settingsRegistry.addGroup('Omnichannel', function () { this.section('Business_Hours', function () { this.add('Livechat_enable_business_hours', false, { type: 'boolean', @@ -616,7 +616,7 @@ Meteor.startup(function () { enableQuery: omnichannelEnabledQuery, }); }); - settingsRegistry.addGroup('SMS', function () { + void settingsRegistry.addGroup('SMS', function () { this.add('SMS_Enabled', false, { type: 'boolean', i18nLabel: 'Enabled', diff --git a/apps/meteor/app/livechat/server/externalFrame/settings.ts b/apps/meteor/app/livechat/server/externalFrame/settings.ts index c1cbbde0781..1860dc265bf 100644 --- a/apps/meteor/app/livechat/server/externalFrame/settings.ts +++ b/apps/meteor/app/livechat/server/externalFrame/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('Omnichannel', function () { +void settingsRegistry.addGroup('Omnichannel', function () { this.section('External Frame', function () { this.add('Omnichannel_External_Frame_Enabled', false, { type: 'boolean', diff --git a/apps/meteor/app/livechat/server/lib/Helper.js b/apps/meteor/app/livechat/server/lib/Helper.js index 26510dc0f12..0081e47c818 100644 --- a/apps/meteor/app/livechat/server/lib/Helper.js +++ b/apps/meteor/app/livechat/server/lib/Helper.js @@ -270,7 +270,7 @@ export const normalizeAgent = (agentId) => { export const dispatchAgentDelegated = (rid, agentId) => { const agent = normalizeAgent(agentId); - api.broadcast('omnichannel.room', rid, { + void api.broadcast('omnichannel.room', rid, { type: 'agentData', data: agent, }); diff --git a/apps/meteor/app/livechat/server/lib/Livechat.js b/apps/meteor/app/livechat/server/lib/Livechat.js index 7efcc512ba6..fa5158c3fe8 100644 --- a/apps/meteor/app/livechat/server/lib/Livechat.js +++ b/apps/meteor/app/livechat/server/lib/Livechat.js @@ -1225,7 +1225,7 @@ export const Livechat = { } LivechatRooms.findOpenByAgent(userId).forEach((room) => { - api.broadcast('omnichannel.room', room._id, { + void api.broadcast('omnichannel.room', room._id, { type: 'agentStatus', status, }); @@ -1241,7 +1241,7 @@ export const Livechat = { }, notifyRoomVisitorChange(roomId, visitor) { - api.broadcast('omnichannel.room', roomId, { + void api.broadcast('omnichannel.room', roomId, { type: 'visitorData', visitor, }); diff --git a/apps/meteor/app/livechat/server/lib/LivechatTyped.ts b/apps/meteor/app/livechat/server/lib/LivechatTyped.ts index 5a0cf62efa5..aac8375315f 100644 --- a/apps/meteor/app/livechat/server/lib/LivechatTyped.ts +++ b/apps/meteor/app/livechat/server/lib/LivechatTyped.ts @@ -135,8 +135,8 @@ class LivechatClass { * @deprecated the `AppEvents.ILivechatRoomClosedHandler` event will be removed * in the next major version of the Apps-Engine */ - Apps.getBridges()?.getListenerBridge().livechatEvent(AppEvents.ILivechatRoomClosedHandler, room); - Apps.getBridges()?.getListenerBridge().livechatEvent(AppEvents.IPostLivechatRoomClosed, room); + void Apps.getBridges()?.getListenerBridge().livechatEvent(AppEvents.ILivechatRoomClosedHandler, room); + void Apps.getBridges()?.getListenerBridge().livechatEvent(AppEvents.IPostLivechatRoomClosed, room); }); callbacks.runAsync('livechat.closeRoom', { room, diff --git a/apps/meteor/app/mailer/server/api.ts b/apps/meteor/app/mailer/server/api.ts index 451d67a3f2f..d6efe19fdc8 100644 --- a/apps/meteor/app/mailer/server/api.ts +++ b/apps/meteor/app/mailer/server/api.ts @@ -165,7 +165,8 @@ export const sendNoWrap = ({ html = undefined; } - Settings.incrementValueById('Triggered_Emails_Count'); + // TODO change to await once Email.send is converted to Email.sendAsync + void Settings.incrementValueById('Triggered_Emails_Count'); const email = { to, from, replyTo, subject, html, text, headers }; diff --git a/apps/meteor/app/mapview/server/settings.ts b/apps/meteor/app/mapview/server/settings.ts index 7b47ac1ed77..a54e99672fe 100644 --- a/apps/meteor/app/mapview/server/settings.ts +++ b/apps/meteor/app/mapview/server/settings.ts @@ -3,7 +3,7 @@ import { Meteor } from 'meteor/meteor'; import { settingsRegistry } from '../../settings/server'; Meteor.startup(function () { - settingsRegistry.add('MapView_Enabled', false, { + void settingsRegistry.add('MapView_Enabled', false, { type: 'boolean', group: 'Message', section: 'Google Maps', @@ -11,7 +11,7 @@ Meteor.startup(function () { i18nLabel: 'MapView_Enabled', i18nDescription: 'MapView_Enabled_Description', }); - settingsRegistry.add('MapView_GMapsAPIKey', '', { + void settingsRegistry.add('MapView_GMapsAPIKey', '', { type: 'string', group: 'Message', section: 'Google Maps', diff --git a/apps/meteor/app/mentions/server/server.js b/apps/meteor/app/mentions/server/server.js index 32e14d28612..c7d1387959e 100644 --- a/apps/meteor/app/mentions/server/server.js +++ b/apps/meteor/app/mentions/server/server.js @@ -59,7 +59,7 @@ const mention = new MentionsServer({ const { language } = this.getUser(sender._id); const msg = TAPi18n.__('Group_mentions_disabled_x_members', { total: this.messageMaxAll }, language); - api.broadcast('notify.ephemeralMessage', sender._id, rid, { + void api.broadcast('notify.ephemeralMessage', sender._id, rid, { msg, }); diff --git a/apps/meteor/app/message-pin/server/settings.ts b/apps/meteor/app/message-pin/server/settings.ts index cc8b9619789..b7c2bbac521 100644 --- a/apps/meteor/app/message-pin/server/settings.ts +++ b/apps/meteor/app/message-pin/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.add('Message_AllowPinning', true, { +void settingsRegistry.add('Message_AllowPinning', true, { type: 'boolean', group: 'Message', public: true, diff --git a/apps/meteor/app/message-star/server/settings.ts b/apps/meteor/app/message-star/server/settings.ts index 5eeb4cb4a0f..c992d3fe824 100644 --- a/apps/meteor/app/message-star/server/settings.ts +++ b/apps/meteor/app/message-star/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.add('Message_AllowStarring', true, { +void settingsRegistry.add('Message_AllowStarring', true, { type: 'boolean', group: 'Message', public: true, diff --git a/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts b/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts index 5daf2c0a2d8..02b4b1e706e 100644 --- a/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts +++ b/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts @@ -139,7 +139,7 @@ export const addSamlService = function (name: string): void { }; export const addSettings = function (name: string): void { - settingsRegistry.addGroup('SAML', function () { + void settingsRegistry.addGroup('SAML', function () { this.with( { tab: 'SAML_Connection', diff --git a/apps/meteor/app/models/client/models/CachedChatSubscription.ts b/apps/meteor/app/models/client/models/CachedChatSubscription.ts index ddcb342fdd8..bc4791ab421 100644 --- a/apps/meteor/app/models/client/models/CachedChatSubscription.ts +++ b/apps/meteor/app/models/client/models/CachedChatSubscription.ts @@ -27,7 +27,7 @@ class CachedChatSubscription extends CachedCollection<SubscriptionWithRoom, ISub if (action === 'removed') { ChatRoom.remove(newRecord.rid); - CachedChatRoom.save(); + void CachedChatRoom.save(); } return newRecord; diff --git a/apps/meteor/app/nextcloud/server/startup.ts b/apps/meteor/app/nextcloud/server/startup.ts index 0e0225ffd53..1d4fec63d81 100644 --- a/apps/meteor/app/nextcloud/server/startup.ts +++ b/apps/meteor/app/nextcloud/server/startup.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('Nextcloud', function () { const enableQuery = { _id: 'Accounts_OAuth_Nextcloud', diff --git a/apps/meteor/app/notifications/server/lib/Notifications.ts b/apps/meteor/app/notifications/server/lib/Notifications.ts index 9784ac1f270..f070e1f1f33 100644 --- a/apps/meteor/app/notifications/server/lib/Notifications.ts +++ b/apps/meteor/app/notifications/server/lib/Notifications.ts @@ -32,7 +32,7 @@ const notifications = new NotificationsModule(Stream); notifications.configure(); notifications.streamLocal.on('broadcast', ({ eventName, args }) => { - api.broadcastLocal(eventName, ...args); + void api.broadcastLocal(eventName, ...args); }); export default notifications; diff --git a/apps/meteor/app/oauth2-server-config/server/oauth/default-services.ts b/apps/meteor/app/oauth2-server-config/server/oauth/default-services.ts index 68d05ef7fa7..cd2d4e6c862 100644 --- a/apps/meteor/app/oauth2-server-config/server/oauth/default-services.ts +++ b/apps/meteor/app/oauth2-server-config/server/oauth/default-services.ts @@ -17,4 +17,5 @@ async function run(): Promise<void> { }); } } -run(); + +void run(); diff --git a/apps/meteor/app/otr/client/OTRRoom.ts b/apps/meteor/app/otr/client/OTRRoom.ts index 36ac940b1cc..dcfb9fc4583 100644 --- a/apps/meteor/app/otr/client/OTRRoom.ts +++ b/apps/meteor/app/otr/client/OTRRoom.ts @@ -94,7 +94,7 @@ export class OTRRoom implements IOTRRoom { } acknowledge(): void { - APIClient.post('/v1/statistics.telemetry', { params: [{ eventName: 'otrStats', timestamp: Date.now(), rid: this._roomId }] }); + void APIClient.post('/v1/statistics.telemetry', { params: [{ eventName: 'otrStats', timestamp: Date.now(), rid: this._roomId }] }); this.peerId && Notifications.notifyUser(this.peerId, 'otr', 'acknowledge', { diff --git a/apps/meteor/app/otr/server/settings.ts b/apps/meteor/app/otr/server/settings.ts index 7490701d75d..511f209e4bb 100644 --- a/apps/meteor/app/otr/server/settings.ts +++ b/apps/meteor/app/otr/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OTR', function () { +void settingsRegistry.addGroup('OTR', function () { this.add('OTR_Enable', true, { type: 'boolean', i18nLabel: 'Enabled', diff --git a/apps/meteor/app/reactions/server/setReaction.ts b/apps/meteor/app/reactions/server/setReaction.ts index e39b5e2121a..cabf48d7e79 100644 --- a/apps/meteor/app/reactions/server/setReaction.ts +++ b/apps/meteor/app/reactions/server/setReaction.ts @@ -148,7 +148,7 @@ Meteor.methods<ServerMethods>({ return executeSetReaction(reaction, messageId, shouldReact); } catch (e: any) { if (e.error === 'error-not-allowed' && e.reason && e.details && e.details.rid) { - api.broadcast('notify.ephemeralMessage', uid, e.details.rid, { + void api.broadcast('notify.ephemeralMessage', uid, e.details.rid, { msg: e.reason, }); diff --git a/apps/meteor/app/retention-policy/server/startup/settings.ts b/apps/meteor/app/retention-policy/server/startup/settings.ts index 30506149498..1863e99a0d8 100644 --- a/apps/meteor/app/retention-policy/server/startup/settings.ts +++ b/apps/meteor/app/retention-policy/server/startup/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('RetentionPolicy', function () { +void settingsRegistry.addGroup('RetentionPolicy', function () { const globalQuery = { _id: 'RetentionPolicy_Enabled', value: true, diff --git a/apps/meteor/app/settings/server/SettingsRegistry.ts b/apps/meteor/app/settings/server/SettingsRegistry.ts index 2f75982b0ef..8f004758d3c 100644 --- a/apps/meteor/app/settings/server/SettingsRegistry.ts +++ b/apps/meteor/app/settings/server/SettingsRegistry.ts @@ -229,7 +229,7 @@ export class SettingsRegistry { (preset: ISettingAddOptions) => (id: string, value: SettingValue, options: ISettingAddOptions = {}): void => { const mergedOptions = { ...preset, ...options }; - this.add(id, value, mergedOptions); + void this.add(id, value, mergedOptions); }; const sectionSetWith = (preset: ISettingAddOptions) => diff --git a/apps/meteor/app/slackbridge/server/settings.ts b/apps/meteor/app/slackbridge/server/settings.ts index f25b389044c..1d93af6be45 100644 --- a/apps/meteor/app/slackbridge/server/settings.ts +++ b/apps/meteor/app/slackbridge/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('SlackBridge', function () { +void settingsRegistry.addGroup('SlackBridge', function () { this.add('SlackBridge_Enabled', false, { type: 'boolean', i18nLabel: 'Enabled', diff --git a/apps/meteor/app/slashcommands-archiveroom/server/server.ts b/apps/meteor/app/slashcommands-archiveroom/server/server.ts index bf7d2074d72..ed07f22171b 100644 --- a/apps/meteor/app/slashcommands-archiveroom/server/server.ts +++ b/apps/meteor/app/slashcommands-archiveroom/server/server.ts @@ -28,7 +28,7 @@ slashCommands.add({ } if (!room) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_doesnt_exist', { postProcess: 'sprintf', sprintf: [channel], @@ -44,7 +44,7 @@ slashCommands.add({ } if (room.archived) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Duplicate_archived_channel_name', { postProcess: 'sprintf', sprintf: [channel], @@ -56,7 +56,7 @@ slashCommands.add({ Meteor.call('archiveRoom', room._id); Messages.createRoomArchivedByRoomIdAndUser(room._id, Meteor.user()); - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_Archived', { postProcess: 'sprintf', sprintf: [channel], diff --git a/apps/meteor/app/slashcommands-create/server/server.ts b/apps/meteor/app/slashcommands-create/server/server.ts index c89b2fd631b..5203379373e 100644 --- a/apps/meteor/app/slashcommands-create/server/server.ts +++ b/apps/meteor/app/slashcommands-create/server/server.ts @@ -38,7 +38,7 @@ slashCommands.add({ const room = Rooms.findOneByName(channelStr); if (room != null) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_already_exist', { postProcess: 'sprintf', sprintf: [channelStr], diff --git a/apps/meteor/app/slashcommands-help/server/server.ts b/apps/meteor/app/slashcommands-help/server/server.ts index 612b3d7f5e0..f22b38b3082 100644 --- a/apps/meteor/app/slashcommands-help/server/server.ts +++ b/apps/meteor/app/slashcommands-help/server/server.ts @@ -57,7 +57,7 @@ slashCommands.add({ }, ]; keys.forEach((key) => { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__(key.key, { postProcess: 'sprintf', sprintf: [key.command], diff --git a/apps/meteor/app/slashcommands-hide/server/hide.ts b/apps/meteor/app/slashcommands-hide/server/hide.ts index 807ae8aa468..459d6c2e635 100644 --- a/apps/meteor/app/slashcommands-hide/server/hide.ts +++ b/apps/meteor/app/slashcommands-hide/server/hide.ts @@ -43,7 +43,7 @@ slashCommands.add({ usernames: { $all: [user.username, strippedRoom] }, }); if (!roomObject) { - api.broadcast('notify.ephemeralMessage', user._id, item.rid, { + void api.broadcast('notify.ephemeralMessage', user._id, item.rid, { msg: TAPi18n.__('Channel_doesnt_exist', { postProcess: 'sprintf', sprintf: [room], @@ -52,7 +52,7 @@ slashCommands.add({ }); } if (!Subscriptions.findOneByRoomIdAndUserId(roomObject._id, user._id, { fields: { _id: 1 } })) { - api.broadcast('notify.ephemeralMessage', user._id, item.rid, { + void api.broadcast('notify.ephemeralMessage', user._id, item.rid, { msg: TAPi18n.__('error-logged-user-not-in-room', { postProcess: 'sprintf', sprintf: [room], diff --git a/apps/meteor/app/slashcommands-invite/server/server.ts b/apps/meteor/app/slashcommands-invite/server/server.ts index 24521bc6511..c0f3eb2b456 100644 --- a/apps/meteor/app/slashcommands-invite/server/server.ts +++ b/apps/meteor/app/slashcommands-invite/server/server.ts @@ -27,7 +27,7 @@ slashCommands.add({ }); const userId = Meteor.userId() as string; if (users.count() === 0) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('User_doesnt_exist', { postProcess: 'sprintf', sprintf: [usernames.join(' @')], @@ -44,7 +44,7 @@ slashCommands.add({ return true; } const usernameStr = user.username as string; - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Username_is_already_in_here', { postProcess: 'sprintf', sprintf: [usernameStr], @@ -65,11 +65,11 @@ slashCommands.add({ return; } if (error === 'cant-invite-for-direct-room') { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Cannot_invite_users_to_direct_rooms', { lng: settings.get('Language') || 'en' }), }); } else { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__(error, { lng: settings.get('Language') || 'en' }), }); } diff --git a/apps/meteor/app/slashcommands-inviteall/server/server.ts b/apps/meteor/app/slashcommands-inviteall/server/server.ts index 6e65d241f96..a20f7bcaf85 100644 --- a/apps/meteor/app/slashcommands-inviteall/server/server.ts +++ b/apps/meteor/app/slashcommands-inviteall/server/server.ts @@ -40,7 +40,7 @@ function inviteAll<T extends string>(type: T): SlashCommand<T>['callback'] { const targetChannel = type === 'from' ? Rooms.findOneById(item.rid) : Rooms.findOneByName(channel); if (!baseChannel) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_doesnt_exist', { postProcess: 'sprintf', sprintf: [channel], @@ -67,7 +67,7 @@ function inviteAll<T extends string>(type: T): SlashCommand<T>['callback'] { if (!targetChannel && ['c', 'p'].indexOf(baseChannel.t) > -1) { Meteor.call(baseChannel.t === 'c' ? 'createChannel' : 'createPrivateGroup', channel, users); - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_created', { postProcess: 'sprintf', sprintf: [channel], @@ -80,13 +80,13 @@ function inviteAll<T extends string>(type: T): SlashCommand<T>['callback'] { users, }); } - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Users_added', { lng }), }); return; } catch (e: any) { const msg = e.error === 'cant-invite-for-direct-room' ? 'Cannot_invite_users_to_direct_rooms' : e.error; - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__(msg, { lng }), }); } diff --git a/apps/meteor/app/slashcommands-join/server/server.ts b/apps/meteor/app/slashcommands-join/server/server.ts index d4278df9ff6..b3e5aba1bdd 100644 --- a/apps/meteor/app/slashcommands-join/server/server.ts +++ b/apps/meteor/app/slashcommands-join/server/server.ts @@ -25,7 +25,7 @@ slashCommands.add({ } if (!room) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_doesnt_exist', { postProcess: 'sprintf', sprintf: [channel], diff --git a/apps/meteor/app/slashcommands-kick/server/server.ts b/apps/meteor/app/slashcommands-kick/server/server.ts index c35a1094c6f..5ac1ae2463c 100644 --- a/apps/meteor/app/slashcommands-kick/server/server.ts +++ b/apps/meteor/app/slashcommands-kick/server/server.ts @@ -21,7 +21,7 @@ slashCommands.add({ const kickedUser = Users.findOneByUsernameIgnoringCase(username); if (kickedUser == null) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Username_doesnt_exist', { postProcess: 'sprintf', sprintf: [username], diff --git a/apps/meteor/app/slashcommands-leave/server/leave.ts b/apps/meteor/app/slashcommands-leave/server/leave.ts index 636eb0463e2..9bfb15e39b7 100644 --- a/apps/meteor/app/slashcommands-leave/server/leave.ts +++ b/apps/meteor/app/slashcommands-leave/server/leave.ts @@ -20,7 +20,7 @@ const Leave: SlashCommand<'leave'>['callback'] = function Leave(_command, _param return; } const user = Users.findOneById(userId); - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__(error, { lng: user?.language || settings.get('Language') || 'en' }), }); } diff --git a/apps/meteor/app/slashcommands-msg/server/server.ts b/apps/meteor/app/slashcommands-msg/server/server.ts index 8c3107b705a..fe3e47ee127 100644 --- a/apps/meteor/app/slashcommands-msg/server/server.ts +++ b/apps/meteor/app/slashcommands-msg/server/server.ts @@ -18,7 +18,7 @@ slashCommands.add({ const separator = trimmedParams.indexOf(' '); const userId = Meteor.userId() as string; if (separator === -1) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Username_and_message_must_not_be_empty', { lng: settings.get('Language') || 'en' }), }); return; @@ -29,7 +29,7 @@ slashCommands.add({ const targetUser = Users.findOneByUsernameIgnoringCase(targetUsername); if (targetUser == null) { const user = Users.findOneById(userId, { fields: { language: 1 } }); - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Username_doesnt_exist', { postProcess: 'sprintf', sprintf: [targetUsernameOrig], diff --git a/apps/meteor/app/slashcommands-mute/server/mute.ts b/apps/meteor/app/slashcommands-mute/server/mute.ts index 7066461eea7..e212b833245 100644 --- a/apps/meteor/app/slashcommands-mute/server/mute.ts +++ b/apps/meteor/app/slashcommands-mute/server/mute.ts @@ -21,7 +21,7 @@ slashCommands.add({ const userId = Meteor.userId() as string; const mutedUser = Users.findOneByUsernameIgnoringCase(username); if (mutedUser == null) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Username_doesnt_exist', { postProcess: 'sprintf', sprintf: [username], diff --git a/apps/meteor/app/slashcommands-mute/server/unmute.ts b/apps/meteor/app/slashcommands-mute/server/unmute.ts index 1a4db593d45..5c96ff9d4f3 100644 --- a/apps/meteor/app/slashcommands-mute/server/unmute.ts +++ b/apps/meteor/app/slashcommands-mute/server/unmute.ts @@ -20,7 +20,7 @@ slashCommands.add({ const userId = Meteor.userId() as string; const unmutedUser = Users.findOneByUsernameIgnoringCase(username); if (unmutedUser == null) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Username_doesnt_exist', { postProcess: 'sprintf', sprintf: [username], diff --git a/apps/meteor/app/slashcommands-status/client/status.ts b/apps/meteor/app/slashcommands-status/client/status.ts index e6fd1205b0c..0ebcfd8142a 100644 --- a/apps/meteor/app/slashcommands-status/client/status.ts +++ b/apps/meteor/app/slashcommands-status/client/status.ts @@ -16,7 +16,7 @@ slashCommands.add({ dispatchToastMessage({ type: 'error', message: error }); return; } - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('StatusMessage_Changed_Successfully', { lng: settings.get('Language') || 'en' }), }); }); diff --git a/apps/meteor/app/slashcommands-status/server/status.ts b/apps/meteor/app/slashcommands-status/server/status.ts index 4b92d3459ab..4144b1f16f0 100644 --- a/apps/meteor/app/slashcommands-status/server/status.ts +++ b/apps/meteor/app/slashcommands-status/server/status.ts @@ -17,14 +17,14 @@ slashCommands.add({ if (err) { if (err.error === 'error-not-allowed') { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('StatusMessage_Change_Disabled', { lng }), }); } throw err; } else { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('StatusMessage_Changed_Successfully', { lng }), }); } diff --git a/apps/meteor/app/slashcommands-unarchiveroom/server/server.ts b/apps/meteor/app/slashcommands-unarchiveroom/server/server.ts index 8b425884035..abed0da3863 100644 --- a/apps/meteor/app/slashcommands-unarchiveroom/server/server.ts +++ b/apps/meteor/app/slashcommands-unarchiveroom/server/server.ts @@ -25,7 +25,7 @@ slashCommands.add({ const userId = Meteor.userId() as string; if (!room) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_doesnt_exist', { postProcess: 'sprintf', sprintf: [channel], @@ -41,7 +41,7 @@ slashCommands.add({ } if (!room.archived) { - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_already_Unarchived', { postProcess: 'sprintf', sprintf: [channel], @@ -54,7 +54,7 @@ slashCommands.add({ Meteor.call('unarchiveRoom', room._id); Messages.createRoomUnarchivedByRoomIdAndUser(room._id, Meteor.user()); - api.broadcast('notify.ephemeralMessage', userId, item.rid, { + void api.broadcast('notify.ephemeralMessage', userId, item.rid, { msg: TAPi18n.__('Channel_Unarchived', { postProcess: 'sprintf', sprintf: [channel], diff --git a/apps/meteor/app/smarsh-connector/server/settings.js b/apps/meteor/app/smarsh-connector/server/settings.js index f5fe44cca1b..2e6b6942066 100644 --- a/apps/meteor/app/smarsh-connector/server/settings.js +++ b/apps/meteor/app/smarsh-connector/server/settings.js @@ -2,7 +2,7 @@ import moment from 'moment-timezone'; import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('Smarsh', function addSettings() { +void settingsRegistry.addGroup('Smarsh', function addSettings() { this.add('Smarsh_Enabled', false, { type: 'boolean', i18nLabel: 'Smarsh_Enabled', diff --git a/apps/meteor/app/statistics/server/functions/updateStatsCounter.ts b/apps/meteor/app/statistics/server/functions/updateStatsCounter.ts index f4661277202..c9eb356841b 100644 --- a/apps/meteor/app/statistics/server/functions/updateStatsCounter.ts +++ b/apps/meteor/app/statistics/server/functions/updateStatsCounter.ts @@ -5,7 +5,7 @@ import telemetryEvent from '../lib/telemetryEvents'; type updateCounterDataType = { settingsId: string }; export function updateCounter(data: updateCounterDataType): void { - Settings.incrementValueById(data.settingsId); + void Settings.incrementValueById(data.settingsId); } telemetryEvent.register('updateCounter', updateCounter); diff --git a/apps/meteor/app/theme/server/variables.ts b/apps/meteor/app/theme/server/variables.ts index 93fe0d75bff..05f0c31364c 100644 --- a/apps/meteor/app/theme/server/variables.ts +++ b/apps/meteor/app/theme/server/variables.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.add('theme-custom-css', '', { +void settingsRegistry.add('theme-custom-css', '', { group: 'Layout', type: 'code', code: 'text/css', diff --git a/apps/meteor/app/threads/server/settings.ts b/apps/meteor/app/threads/server/settings.ts index b53bb858564..3699223674b 100644 --- a/apps/meteor/app/threads/server/settings.ts +++ b/apps/meteor/app/threads/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('Threads', function () { +void settingsRegistry.addGroup('Threads', function () { this.add('Threads_enabled', true, { group: 'Threads', i18nLabel: 'Enable', diff --git a/apps/meteor/app/tokenpass/server/startup.js b/apps/meteor/app/tokenpass/server/startup.js index d9f52f6dabd..6a2fbe6320f 100644 --- a/apps/meteor/app/tokenpass/server/startup.js +++ b/apps/meteor/app/tokenpass/server/startup.js @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { this.section('Tokenpass', function () { const enableQuery = { _id: 'Accounts_OAuth_Tokenpass', diff --git a/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts b/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts index 74521d562de..65ee7bca416 100644 --- a/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts +++ b/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts @@ -70,12 +70,12 @@ export class CachedCollection<T extends object, U = T> extends Emitter<{ changed CachedCollectionManager.register(this); if (!userRelated) { - this.init(); + void this.init(); return; } CachedCollectionManager.onLogin(() => { - this.init(); + void this.init(); }); } @@ -210,7 +210,7 @@ export class CachedCollection<T extends object, U = T> extends Emitter<{ changed clearCacheOnLogout() { if (this.userRelated === true) { - this.clearCache(); + void this.clearCache(); } } diff --git a/apps/meteor/app/ui-cached-collection/client/models/CachedCollectionManager.ts b/apps/meteor/app/ui-cached-collection/client/models/CachedCollectionManager.ts index a12f1756ecc..b6d75c7ee84 100644 --- a/apps/meteor/app/ui-cached-collection/client/models/CachedCollectionManager.ts +++ b/apps/meteor/app/ui-cached-collection/client/models/CachedCollectionManager.ts @@ -56,7 +56,7 @@ class CachedCollectionManager extends Emitter<{ reconnect: void; login: string | clearAllCache() { for (const item of this.items) { - item.clearCache(); + void item.clearCache(); } } diff --git a/apps/meteor/app/ui-message/client/actionButtons/messageAction.ts b/apps/meteor/app/ui-message/client/actionButtons/messageAction.ts index 28c74d5efce..e8d89475e43 100644 --- a/apps/meteor/app/ui-message/client/actionButtons/messageAction.ts +++ b/apps/meteor/app/ui-message/client/actionButtons/messageAction.ts @@ -21,7 +21,7 @@ export const onAdded = (button: IUIActionButton): void => }, action(_, props) { const { message = messageArgs(this).msg } = props; - triggerActionButtonAction({ + void triggerActionButtonAction({ rid: message.rid, mid: message._id, actionId: button.actionId, diff --git a/apps/meteor/app/ui-message/client/actionButtons/messageBox.ts b/apps/meteor/app/ui-message/client/actionButtons/messageBox.ts index 62273af6145..f29e8659847 100644 --- a/apps/meteor/app/ui-message/client/actionButtons/messageBox.ts +++ b/apps/meteor/app/ui-message/client/actionButtons/messageBox.ts @@ -20,7 +20,7 @@ export const onAdded = (button: IUIActionButton): void => return applyButtonFilters(button, Rooms.findOne(Session.get('openedRoom'))); }, action() { - triggerActionButtonAction({ + void triggerActionButtonAction({ rid: Session.get('openedRoom'), actionId: button.actionId, appId: button.appId, diff --git a/apps/meteor/app/ui-message/client/findParentMessage.ts b/apps/meteor/app/ui-message/client/findParentMessage.ts index 2c08d6432ce..f5fa3888f8f 100644 --- a/apps/meteor/app/ui-message/client/findParentMessage.ts +++ b/apps/meteor/app/ui-message/client/findParentMessage.ts @@ -21,7 +21,7 @@ export const findParentMessage = (() => { }); const get = async (tmid: IMessage['_id']) => { - getMessages(); + void getMessages(); const messages = await pending; return messages.find(({ _id }) => _id === tmid); }; diff --git a/apps/meteor/app/ui-message/client/popup/components/composerBoxPopupPreview/ComposerBoxPopupPreview.tsx b/apps/meteor/app/ui-message/client/popup/components/composerBoxPopupPreview/ComposerBoxPopupPreview.tsx index e11a1bfddc9..20463b85a66 100644 --- a/apps/meteor/app/ui-message/client/popup/components/composerBoxPopupPreview/ComposerBoxPopupPreview.tsx +++ b/apps/meteor/app/ui-message/client/popup/components/composerBoxPopupPreview/ComposerBoxPopupPreview.tsx @@ -58,7 +58,7 @@ const ComposerBoxPopupPreview = forwardRef< const params = matches[2]; // TODO: Fix this solve the typing issue - executeSlashCommandPreviewMethod({ cmd, params, msg: { rid, tmid } }, { id: item._id, type: item.type, value: item.value }); + void executeSlashCommandPreviewMethod({ cmd, params, msg: { rid, tmid } }, { id: item._id, type: item.type, value: item.value }); chat?.composer?.setText(''); }, }), diff --git a/apps/meteor/app/ui-utils/client/lib/RoomHistoryManager.ts b/apps/meteor/app/ui-utils/client/lib/RoomHistoryManager.ts index b8cc0931be4..4ceb06e1ab2 100644 --- a/apps/meteor/app/ui-utils/client/lib/RoomHistoryManager.ts +++ b/apps/meteor/app/ui-utils/client/lib/RoomHistoryManager.ts @@ -50,7 +50,7 @@ export function upsertMessageBulk( if (index === msgs.length - 1) { collection.queries = queries; } - upsertMessage({ msg, subscription }, collection); + void upsertMessage({ msg, subscription }, collection); }); } diff --git a/apps/meteor/app/ui-utils/client/lib/RoomManager.ts b/apps/meteor/app/ui-utils/client/lib/RoomManager.ts index 26c54685c05..c0088af50a7 100644 --- a/apps/meteor/app/ui-utils/client/lib/RoomManager.ts +++ b/apps/meteor/app/ui-utils/client/lib/RoomManager.ts @@ -132,7 +132,7 @@ const handleTrackSettingsChange = (msg: IMessage) => { return; } - Tracker.nonreactive(() => { + void Tracker.nonreactive(async () => { if (msg.t === 'room_changed_privacy') { const type = FlowRouter.current().route?.name === 'channel' ? 'c' : 'p'; close(type + FlowRouter.getParam('name')); @@ -174,11 +174,11 @@ const computation = Tracker.autorun(() => { const room = roomCoordinator.getRoomDirectives(type)?.findRoom(name); - RoomHistoryManager.getMoreIfIsEmpty(record.rid); + void RoomHistoryManager.getMoreIfIsEmpty(record.rid); if (room) { if (record.streamActive !== true) { - ( + void ( roomMessagesStream.on(record.rid, async (msg) => { // Should not send message to room if room has not loaded all the current messages // if (RoomHistoryManager.hasMoreNext(record.rid) !== false) { diff --git a/apps/meteor/app/ui-vrecord/server/settings.ts b/apps/meteor/app/ui-vrecord/server/settings.ts index 63ce5fd4bff..e5d3c9eb505 100644 --- a/apps/meteor/app/ui-vrecord/server/settings.ts +++ b/apps/meteor/app/ui-vrecord/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('Message', function () { +void settingsRegistry.addGroup('Message', function () { this.add('Message_VideoRecorderEnabled', true, { type: 'boolean', public: true, diff --git a/apps/meteor/app/ui/client/lib/recorderjs/AudioRecorder.ts b/apps/meteor/app/ui/client/lib/recorderjs/AudioRecorder.ts index c4b55035965..27eb996e9da 100644 --- a/apps/meteor/app/ui/client/lib/recorderjs/AudioRecorder.ts +++ b/apps/meteor/app/ui/client/lib/recorderjs/AudioRecorder.ts @@ -25,7 +25,7 @@ export class AudioRecorder { return; } - this.audioContext.close(); + void this.audioContext.close(); delete this.audioContext; } diff --git a/apps/meteor/app/ui/client/views/app/photoswipeContent.ts b/apps/meteor/app/ui/client/views/app/photoswipeContent.ts index c8c38265bf7..4fd32f9fdda 100644 --- a/apps/meteor/app/ui/client/views/app/photoswipeContent.ts +++ b/apps/meteor/app/ui/client/views/app/photoswipeContent.ts @@ -140,7 +140,7 @@ const createEventListenerFor = let hasOpenedGallery = false; - slidePromises.reduce( + void slidePromises.reduce( (p, curr) => p .then(() => curr) diff --git a/apps/meteor/app/user-status/server/methods/deleteCustomUserStatus.js b/apps/meteor/app/user-status/server/methods/deleteCustomUserStatus.js index d3452346de7..5f0ca18cc1a 100644 --- a/apps/meteor/app/user-status/server/methods/deleteCustomUserStatus.js +++ b/apps/meteor/app/user-status/server/methods/deleteCustomUserStatus.js @@ -16,7 +16,7 @@ Meteor.methods({ } await CustomUserStatus.removeById(userStatusID); - api.broadcast('user.deleteCustomStatus', userStatus); + void api.broadcast('user.deleteCustomStatus', userStatus); return true; }, diff --git a/apps/meteor/app/user-status/server/methods/insertOrUpdateUserStatus.js b/apps/meteor/app/user-status/server/methods/insertOrUpdateUserStatus.js index 17e5cf65fbb..a933c482077 100644 --- a/apps/meteor/app/user-status/server/methods/insertOrUpdateUserStatus.js +++ b/apps/meteor/app/user-status/server/methods/insertOrUpdateUserStatus.js @@ -62,7 +62,7 @@ Meteor.methods({ const _id = await (await CustomUserStatus.create(createUserStatus)).insertedId; - api.broadcast('user.updateCustomStatus', createUserStatus); + void api.broadcast('user.updateCustomStatus', createUserStatus); return _id; } @@ -76,7 +76,7 @@ Meteor.methods({ await CustomUserStatus.setStatusType(userStatusData._id, userStatusData.statusType); } - api.broadcast('user.updateCustomStatus', userStatusData); + void api.broadcast('user.updateCustomStatus', userStatusData); return true; }, diff --git a/apps/meteor/app/version-check/server/addSettings.ts b/apps/meteor/app/version-check/server/addSettings.ts index c111b7c2339..a768bddca91 100644 --- a/apps/meteor/app/version-check/server/addSettings.ts +++ b/apps/meteor/app/version-check/server/addSettings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('General', function () { +void settingsRegistry.addGroup('General', function () { this.section('Update', function () { this.add('Update_LatestAvailableVersion', '0.0.0', { type: 'string', diff --git a/apps/meteor/app/webdav/server/methods/addWebdavAccount.ts b/apps/meteor/app/webdav/server/methods/addWebdavAccount.ts index 1b8a9a7cb4c..2266c2d47be 100644 --- a/apps/meteor/app/webdav/server/methods/addWebdavAccount.ts +++ b/apps/meteor/app/webdav/server/methods/addWebdavAccount.ts @@ -68,7 +68,7 @@ Meteor.methods<ServerMethods>({ await client.stat('/'); await WebdavAccounts.insertOne(accountData); - api.broadcast('notify.webdav', userId, { + void api.broadcast('notify.webdav', userId, { type: 'changed', account: accountData, }); @@ -130,7 +130,7 @@ Meteor.methods<ServerMethods>({ upsert: true, }, ); - api.broadcast('notify.webdav', userId, { + void api.broadcast('notify.webdav', userId, { type: 'changed', account: accountData, }); diff --git a/apps/meteor/app/webdav/server/methods/removeWebdavAccount.ts b/apps/meteor/app/webdav/server/methods/removeWebdavAccount.ts index 6de2ad22ed8..ccf87732d2c 100644 --- a/apps/meteor/app/webdav/server/methods/removeWebdavAccount.ts +++ b/apps/meteor/app/webdav/server/methods/removeWebdavAccount.ts @@ -30,7 +30,7 @@ Meteor.methods({ const removed = await WebdavAccounts.removeByUserAndId(accountId, userId); if (removed) { - api.broadcast('notify.webdav', userId, { + void api.broadcast('notify.webdav', userId, { type: 'removed', account: { _id: accountId }, }); diff --git a/apps/meteor/app/webdav/server/startup/settings.ts b/apps/meteor/app/webdav/server/startup/settings.ts index 178d6d30c2d..1924b5a2089 100644 --- a/apps/meteor/app/webdav/server/startup/settings.ts +++ b/apps/meteor/app/webdav/server/startup/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../../settings/server'; -settingsRegistry.addGroup('Webdav Integration', function () { +void settingsRegistry.addGroup('Webdav Integration', function () { this.add('Webdav_Integration_Enabled', false, { type: 'boolean', public: true, diff --git a/apps/meteor/app/webrtc/server/settings.ts b/apps/meteor/app/webrtc/server/settings.ts index 60653260ede..b46fe283002 100644 --- a/apps/meteor/app/webrtc/server/settings.ts +++ b/apps/meteor/app/webrtc/server/settings.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('WebRTC', function () { +void settingsRegistry.addGroup('WebRTC', function () { this.add('WebRTC_Enabled', false, { type: 'boolean', group: 'WebRTC', diff --git a/apps/meteor/app/wordpress/server/startup.ts b/apps/meteor/app/wordpress/server/startup.ts index 79bab1054b5..c9eecc1dcba 100644 --- a/apps/meteor/app/wordpress/server/startup.ts +++ b/apps/meteor/app/wordpress/server/startup.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../settings/server'; -settingsRegistry.addGroup('OAuth', function () { +void settingsRegistry.addGroup('OAuth', function () { return this.section('WordPress', function () { const enableQuery = { _id: 'Accounts_OAuth_Wordpress', diff --git a/apps/meteor/client/lib/banners.ts b/apps/meteor/client/lib/banners.ts index c442484809c..9b6df6abfd6 100644 --- a/apps/meteor/client/lib/banners.ts +++ b/apps/meteor/client/lib/banners.ts @@ -12,8 +12,8 @@ export type LegacyBannerPayload = { icon?: ComponentProps<typeof Icon>['name']; modifiers?: ('large' | 'danger')[]; timer?: number; - action?: () => void; - onClose?: () => void; + action?: () => Promise<void> | void; + onClose?: () => Promise<void> | void; }; type BannerPayload = LegacyBannerPayload | UiKitBannerPayload; diff --git a/apps/meteor/ee/app/canned-responses/server/settings.ts b/apps/meteor/ee/app/canned-responses/server/settings.ts index 204e8f63a40..196de7b9a71 100644 --- a/apps/meteor/ee/app/canned-responses/server/settings.ts +++ b/apps/meteor/ee/app/canned-responses/server/settings.ts @@ -3,7 +3,7 @@ import { settingsRegistry } from '../../../../app/settings/server'; const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true }; export const createSettings = (): void => { - settingsRegistry.add('Canned_Responses_Enable', true, { + void settingsRegistry.add('Canned_Responses_Enable', true, { group: 'Omnichannel', section: 'Canned_Responses', type: 'boolean', diff --git a/apps/meteor/ee/app/license/server/license.internalService.ts b/apps/meteor/ee/app/license/server/license.internalService.ts index f886ae6129a..0ff74351bdb 100644 --- a/apps/meteor/ee/app/license/server/license.internalService.ts +++ b/apps/meteor/ee/app/license/server/license.internalService.ts @@ -16,12 +16,12 @@ export class LicenseService extends ServiceClassInternal implements ILicense { return; } - api.broadcast('authorization.guestPermissions', guestPermissions); - resetEnterprisePermissions(); + void api.broadcast('authorization.guestPermissions', guestPermissions); + void resetEnterprisePermissions(); }); onModule((licenseModule) => { - api.broadcast('license.module', licenseModule); + void api.broadcast('license.module', licenseModule); }); } @@ -30,7 +30,7 @@ export class LicenseService extends ServiceClassInternal implements ILicense { return; } - api.broadcast('authorization.guestPermissions', guestPermissions); + void api.broadcast('authorization.guestPermissions', guestPermissions); resetEnterprisePermissions(); } diff --git a/apps/meteor/ee/app/license/server/license.ts b/apps/meteor/ee/app/license/server/license.ts index 878f409ce64..3066bcf0f4c 100644 --- a/apps/meteor/ee/app/license/server/license.ts +++ b/apps/meteor/ee/app/license/server/license.ts @@ -390,20 +390,20 @@ export function onToggledFeature( const offValidFeature = onValidFeature(feature, () => { if (!enabled) { - up?.(); + void up?.(); enabled = true; } }); const offInvalidFeature = onInvalidFeature(feature, () => { if (enabled) { - down?.(); + void down?.(); enabled = false; } }); if (enabled) { - up?.(); + void up?.(); } return (): void => { diff --git a/apps/meteor/ee/app/livechat-enterprise/server/business-hour/Multiple.ts b/apps/meteor/ee/app/livechat-enterprise/server/business-hour/Multiple.ts index 767a2bbc5ab..48b0f76f61d 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/business-hour/Multiple.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/business-hour/Multiple.ts @@ -40,7 +40,7 @@ export class MultipleBusinessHoursBehavior extends AbstractBusinessHourBehavior }); const businessHoursToOpen = await filterBusinessHoursThatMustBeOpened(activeBusinessHours); for (const businessHour of businessHoursToOpen) { - this.openBusinessHour(businessHour); + void this.openBusinessHour(businessHour); } } @@ -52,7 +52,7 @@ export class MultipleBusinessHoursBehavior extends AbstractBusinessHourBehavior }, }); for (const businessHour of businessHours) { - this.openBusinessHour(businessHour); + void this.openBusinessHour(businessHour); } } @@ -64,7 +64,7 @@ export class MultipleBusinessHoursBehavior extends AbstractBusinessHourBehavior }, }); for (const businessHour of businessHours) { - this.closeBusinessHour(businessHour); + void this.closeBusinessHour(businessHour); } } diff --git a/apps/meteor/ee/app/livechat-enterprise/server/hooks/afterOnHoldChatResumed.ts b/apps/meteor/ee/app/livechat-enterprise/server/hooks/afterOnHoldChatResumed.ts index d3a47693fe5..c5ea9e57a7c 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/hooks/afterOnHoldChatResumed.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/hooks/afterOnHoldChatResumed.ts @@ -9,7 +9,7 @@ const handleAfterOnHoldChatResumed = async (room: any): Promise<void> => { } cbLogger.debug(`Removing current on hold timers for room ${room._id}`); - LivechatEnterprise.releaseOnHoldChat(room); + void LivechatEnterprise.releaseOnHoldChat(room); }; callbacks.add( diff --git a/apps/meteor/ee/app/livechat-enterprise/server/hooks/autoCloseQueued.ts b/apps/meteor/ee/app/livechat-enterprise/server/hooks/autoCloseQueued.ts index 60fe869c6b3..92035df4616 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/hooks/autoCloseQueued.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/hooks/autoCloseQueued.ts @@ -6,7 +6,7 @@ const removeScheduledQueueCloseTime = (inquiry: any): void => { if (!inquiry?._id) { return; } - OmnichannelQueueInactivityMonitor.stopInquiry(inquiry._id); + void OmnichannelQueueInactivityMonitor.stopInquiry(inquiry._id); }; settings.watch('Livechat_max_queue_wait_time', function (value: number) { diff --git a/apps/meteor/ee/app/livechat-enterprise/server/index.ts b/apps/meteor/ee/app/livechat-enterprise/server/index.ts index 7eeb89f57f4..999dfb7f251 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/index.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/index.ts @@ -41,8 +41,8 @@ onLicense('livechat-enterprise', async () => { const { createSettings } = await import('./settings'); Meteor.startup(function () { - createSettings(); - createPermissions(); - createDefaultPriorities(); + void createSettings(); + void createPermissions(); + void createDefaultPriorities(); }); }); diff --git a/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoCloseOnHoldScheduler.ts b/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoCloseOnHoldScheduler.ts index a41ba8fa84a..4a9bf6e55eb 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoCloseOnHoldScheduler.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoCloseOnHoldScheduler.ts @@ -81,5 +81,5 @@ class AutoCloseOnHoldSchedulerClass { export const AutoCloseOnHoldScheduler = new AutoCloseOnHoldSchedulerClass(); Meteor.startup(() => { - AutoCloseOnHoldScheduler.init(); + void AutoCloseOnHoldScheduler.init(); }); diff --git a/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoTransferChatScheduler.ts b/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoTransferChatScheduler.ts index 83670508ea4..84c4273e1aa 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoTransferChatScheduler.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/lib/AutoTransferChatScheduler.ts @@ -109,5 +109,5 @@ class AutoTransferChatSchedulerClass { export const AutoTransferChatScheduler = new AutoTransferChatSchedulerClass(); Meteor.startup(() => { - AutoTransferChatScheduler.init(); + void AutoTransferChatScheduler.init(); }); diff --git a/apps/meteor/ee/app/livechat-enterprise/server/lib/Helper.js b/apps/meteor/ee/app/livechat-enterprise/server/lib/Helper.js index 6f3e7981aa2..c2122f96aec 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/lib/Helper.js +++ b/apps/meteor/ee/app/livechat-enterprise/server/lib/Helper.js @@ -84,7 +84,7 @@ export const dispatchInquiryPosition = async (inquiry, queueInfo) => { const { position, department } = inquiry; const data = await normalizeQueueInfo({ position, queueInfo, department }); const propagateInquiryPosition = Meteor.bindEnvironment((inquiry) => { - api.broadcast('omnichannel.room', inquiry.rid, { + void api.broadcast('omnichannel.room', inquiry.rid, { type: 'queueData', data, }); diff --git a/apps/meteor/ee/app/livechat-enterprise/server/lib/QueueInactivityMonitor.ts b/apps/meteor/ee/app/livechat-enterprise/server/lib/QueueInactivityMonitor.ts index 13ca7d9b01f..601a884624b 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/lib/QueueInactivityMonitor.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/lib/QueueInactivityMonitor.ts @@ -52,7 +52,7 @@ class OmnichannelQueueInactivityMonitorClass { } createIndex(): void { - this._db.collection(SCHEDULER_NAME).createIndex( + void this._db.collection(SCHEDULER_NAME).createIndex( { 'data.inquiryId': 1, }, diff --git a/apps/meteor/ee/app/livechat-enterprise/server/settings.ts b/apps/meteor/ee/app/livechat-enterprise/server/settings.ts index d11af508e94..99b64c4ea55 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/settings.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/settings.ts @@ -7,7 +7,7 @@ const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true }; const businessHoursEnabled = { _id: 'Livechat_enable_business_hours', value: true }; export const createSettings = async (): Promise<void> => { - settingsRegistry.add('Livechat_abandoned_rooms_action', 'none', { + void settingsRegistry.add('Livechat_abandoned_rooms_action', 'none', { type: 'select', group: 'Omnichannel', section: 'Sessions', @@ -23,7 +23,7 @@ export const createSettings = async (): Promise<void> => { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.add('Livechat_abandoned_rooms_closed_custom_message', '', { + void settingsRegistry.add('Livechat_abandoned_rooms_closed_custom_message', '', { type: 'string', group: 'Omnichannel', section: 'Sessions', @@ -34,7 +34,7 @@ export const createSettings = async (): Promise<void> => { modules: ['livechat-enterprise'], }); - settingsRegistry.add('Livechat_last_chatted_agent_routing', false, { + void settingsRegistry.add('Livechat_last_chatted_agent_routing', false, { type: 'boolean', group: 'Omnichannel', section: 'Routing', @@ -44,7 +44,7 @@ export const createSettings = async (): Promise<void> => { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.addGroup('Omnichannel', function () { + void settingsRegistry.addGroup('Omnichannel', function () { this.section('Business_Hours', function () { this.add('Livechat_business_hour_type', 'Single', { type: 'select', @@ -173,7 +173,7 @@ export const createSettings = async (): Promise<void> => { }); }); - settingsRegistry.add('Omnichannel_contact_manager_routing', true, { + void settingsRegistry.add('Omnichannel_contact_manager_routing', true, { type: 'boolean', group: 'Omnichannel', section: 'Routing', @@ -183,7 +183,7 @@ export const createSettings = async (): Promise<void> => { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.add('Livechat_auto_close_on_hold_chats_timeout', 3600, { + void settingsRegistry.add('Livechat_auto_close_on_hold_chats_timeout', 3600, { type: 'int', group: 'Omnichannel', section: 'Sessions', @@ -193,7 +193,7 @@ export const createSettings = async (): Promise<void> => { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.add('Livechat_auto_close_on_hold_chats_custom_message', '', { + void settingsRegistry.add('Livechat_auto_close_on_hold_chats_custom_message', '', { type: 'string', group: 'Omnichannel', section: 'Sessions', @@ -203,7 +203,7 @@ export const createSettings = async (): Promise<void> => { modules: ['livechat-enterprise'], }); - settingsRegistry.add('Livechat_allow_manual_on_hold', false, { + void settingsRegistry.add('Livechat_allow_manual_on_hold', false, { type: 'boolean', group: 'Omnichannel', section: 'Sessions', @@ -214,7 +214,7 @@ export const createSettings = async (): Promise<void> => { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.add('Livechat_auto_transfer_chat_timeout', 0, { + void settingsRegistry.add('Livechat_auto_transfer_chat_timeout', 0, { type: 'int', group: 'Omnichannel', section: 'Sessions', @@ -225,7 +225,7 @@ export const createSettings = async (): Promise<void> => { enableQuery: omnichannelEnabledQuery, }); - settingsRegistry.add('Accounts_Default_User_Preferences_omnichannelTranscriptPDF', false, { + void settingsRegistry.add('Accounts_Default_User_Preferences_omnichannelTranscriptPDF', false, { type: 'boolean', public: true, i18nLabel: 'Omnichannel_transcript_pdf', diff --git a/apps/meteor/ee/app/settings/server/settings.ts b/apps/meteor/ee/app/settings/server/settings.ts index 0bfeeda990e..2eeec315b40 100644 --- a/apps/meteor/ee/app/settings/server/settings.ts +++ b/apps/meteor/ee/app/settings/server/settings.ts @@ -52,7 +52,7 @@ SettingsEvents.on('fetch-settings', (settings: Array<ISetting>): void => { function updateSettings(): void { const enterpriseSettings = Promise.await(Settings.findEnterpriseSettings()); - enterpriseSettings.forEach((record: ISetting) => settings.set(record)); + void enterpriseSettings.forEach((record: ISetting) => settings.set(record)); } Meteor.startup(() => { diff --git a/apps/meteor/ee/server/NetworkBroker.ts b/apps/meteor/ee/server/NetworkBroker.ts index b77c269dec7..3390847058c 100644 --- a/apps/meteor/ee/server/NetworkBroker.ts +++ b/apps/meteor/ee/server/NetworkBroker.ts @@ -75,7 +75,7 @@ export class NetworkBroker implements IBroker { if (!name) { return; } - this.broker.destroyService(name); + void this.broker.destroyService(name); } createService(instance: IServiceClass, serviceDependencies?: string[]): void { @@ -165,7 +165,7 @@ export class NetworkBroker implements IBroker { } async broadcastLocal<T extends keyof EventSignatures>(event: T, ...args: Parameters<EventSignatures[T]>): Promise<void> { - this.broker.broadcastLocal(event, args); + void this.broker.broadcastLocal(event, args); } async broadcastToServices<T extends keyof EventSignatures>( @@ -173,7 +173,7 @@ export class NetworkBroker implements IBroker { event: T, ...args: Parameters<EventSignatures[T]> ): Promise<void> { - this.broker.broadcast(event, args, services); + void this.broker.broadcast(event, args, services); } async nodeList(): Promise<IBrokerNode[]> { diff --git a/apps/meteor/ee/server/apps/communication/websockets.ts b/apps/meteor/ee/server/apps/communication/websockets.ts index 94646477e32..58df570e43f 100644 --- a/apps/meteor/ee/server/apps/communication/websockets.ts +++ b/apps/meteor/ee/server/apps/communication/websockets.ts @@ -143,11 +143,11 @@ export class AppServerNotifier { } async appAdded(appId: string): Promise<void> { - api.broadcast('apps.added', appId); + void api.broadcast('apps.added', appId); } async appRemoved(appId: string): Promise<void> { - api.broadcast('apps.removed', appId); + void api.broadcast('apps.removed', appId); } async appUpdated(appId: string): Promise<void> { @@ -156,7 +156,7 @@ export class AppServerNotifier { return; } - api.broadcast('apps.updated', appId); + void api.broadcast('apps.updated', appId); } async appStatusUpdated(appId: string, status: AppStatus): Promise<void> { @@ -168,7 +168,7 @@ export class AppServerNotifier { } } - api.broadcast('apps.statusUpdate', appId, status); + void api.broadcast('apps.statusUpdate', appId, status); } async appSettingsChange(appId: string, setting: ISetting): Promise<void> { @@ -177,26 +177,26 @@ export class AppServerNotifier { return; } - api.broadcast('apps.settingUpdated', appId, setting); + void api.broadcast('apps.settingUpdated', appId, setting); } async commandAdded(command: string): Promise<void> { - api.broadcast('command.added', command); + void api.broadcast('command.added', command); } async commandDisabled(command: string): Promise<void> { - api.broadcast('command.disabled', command); + void api.broadcast('command.disabled', command); } async commandUpdated(command: string): Promise<void> { - api.broadcast('command.updated', command); + void api.broadcast('command.updated', command); } async commandRemoved(command: string): Promise<void> { - api.broadcast('command.removed', command); + void api.broadcast('command.removed', command); } async actionsChanged(): Promise<void> { - api.broadcast('actions.changed'); + void api.broadcast('actions.changed'); } } diff --git a/apps/meteor/ee/server/apps/orchestrator.js b/apps/meteor/ee/server/apps/orchestrator.js index 40403a97579..d357a4d725e 100644 --- a/apps/meteor/ee/server/apps/orchestrator.js +++ b/apps/meteor/ee/server/apps/orchestrator.js @@ -234,7 +234,7 @@ export class AppServerOrchestrator { export const AppEvents = AppInterface; export const Apps = new AppServerOrchestrator(); -settingsRegistry.addGroup('General', function () { +void settingsRegistry.addGroup('General', function () { this.section('Apps', function () { this.add('Apps_Logs_TTL', '30_days', { type: 'select', diff --git a/apps/meteor/ee/server/apps/startup.ts b/apps/meteor/ee/server/apps/startup.ts index 5f40c5a9001..2a63e11aa48 100644 --- a/apps/meteor/ee/server/apps/startup.ts +++ b/apps/meteor/ee/server/apps/startup.ts @@ -5,5 +5,5 @@ import { Apps } from './orchestrator'; Meteor.startup(function _appServerOrchestrator() { Apps.initialize(); - Apps.load(); + void Apps.load(); }); diff --git a/apps/meteor/ee/server/lib/audit/startup.ts b/apps/meteor/ee/server/lib/audit/startup.ts index cd903d5c709..1ca24f7e20a 100644 --- a/apps/meteor/ee/server/lib/audit/startup.ts +++ b/apps/meteor/ee/server/lib/audit/startup.ts @@ -14,7 +14,7 @@ export const createPermissions = () => { ] as const; for (const permission of permissions) { - Permissions.create(permission._id, permission.roles); + void Permissions.create(permission._id, permission.roles); } defaultRoles.forEach((role) => createOrUpdateProtectedRole(role.name, role)); diff --git a/apps/meteor/ee/server/lib/deviceManagement/startup.ts b/apps/meteor/ee/server/lib/deviceManagement/startup.ts index 71ba4297cd7..db83c415341 100644 --- a/apps/meteor/ee/server/lib/deviceManagement/startup.ts +++ b/apps/meteor/ee/server/lib/deviceManagement/startup.ts @@ -9,7 +9,7 @@ export const createPermissions = async (): Promise<void> => { }; export const createEmailTemplates = async (): Promise<void> => { - settingsRegistry.addGroup('Email', function () { + void settingsRegistry.addGroup('Email', function () { this.section('Device Management - Login Detected', function () { this.add('Device_Management_Email_Subject', '{Device_Management_Email_Subject}', { type: 'string', diff --git a/apps/meteor/ee/server/lib/engagementDashboard/startup.ts b/apps/meteor/ee/server/lib/engagementDashboard/startup.ts index d65f7e09a2f..bc93dfbd931 100644 --- a/apps/meteor/ee/server/lib/engagementDashboard/startup.ts +++ b/apps/meteor/ee/server/lib/engagementDashboard/startup.ts @@ -22,5 +22,5 @@ export const prepareAnalytics = async (): Promise<void> => { }; export const prepareAuthorization = async (): Promise<void> => { - Permissions.create('view-engagement-dashboard', ['admin']); + void Permissions.create('view-engagement-dashboard', ['admin']); }; diff --git a/apps/meteor/ee/server/lib/ldap/Manager.ts b/apps/meteor/ee/server/lib/ldap/Manager.ts index 9de6713f32b..3a085a3fc6f 100644 --- a/apps/meteor/ee/server/lib/ldap/Manager.ts +++ b/apps/meteor/ee/server/lib/ldap/Manager.ts @@ -529,7 +529,7 @@ export class LDAPEEManager extends LDAPManager { return new Promise((resolve, reject) => { let count = 0; - ldap.searchAllUsers<IImportUser>({ + void ldap.searchAllUsers<IImportUser>({ entryCallback: (entry: ldapjs.SearchEntry): IImportUser | undefined => { const data = ldap.extractLdapEntryData(entry); count++; diff --git a/apps/meteor/ee/server/lib/roles/insertRole.ts b/apps/meteor/ee/server/lib/roles/insertRole.ts index 3d43d968297..b4c4b72c2cb 100644 --- a/apps/meteor/ee/server/lib/roles/insertRole.ts +++ b/apps/meteor/ee/server/lib/roles/insertRole.ts @@ -24,7 +24,7 @@ const insertRoleAsync = async (roleData: Omit<IRole, '_id'>, options: InsertRole const roleId = result.insertedId; if (options.broadcastUpdate) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type: 'changed', _id: roleId, }); diff --git a/apps/meteor/ee/server/lib/roles/updateRole.ts b/apps/meteor/ee/server/lib/roles/updateRole.ts index 04f9ce41ab4..9af035ea0c3 100644 --- a/apps/meteor/ee/server/lib/roles/updateRole.ts +++ b/apps/meteor/ee/server/lib/roles/updateRole.ts @@ -39,7 +39,7 @@ const updateRoleAsync = async (roleId: IRole['_id'], roleData: Omit<IRole, '_id' await Roles.updateById(roleId, roleData.name, roleData.scope, roleData.description, roleData.mandatory2fa); if (options.broadcastUpdate) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type: 'changed', _id: roleId, }); diff --git a/apps/meteor/ee/server/lib/syncUserRoles.ts b/apps/meteor/ee/server/lib/syncUserRoles.ts index 8779bf8fdc7..dc1ffa74da5 100644 --- a/apps/meteor/ee/server/lib/syncUserRoles.ts +++ b/apps/meteor/ee/server/lib/syncUserRoles.ts @@ -38,7 +38,7 @@ function broadcastRoleChange(type: string, roleList: Array<IRole['_id']>, user: const { _id, username } = user; for (const roleId of roleList) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type, _id: roleId, u: { diff --git a/apps/meteor/ee/server/local-services/instance/service.ts b/apps/meteor/ee/server/local-services/instance/service.ts index 425ff0116c5..e519b7dbfa8 100644 --- a/apps/meteor/ee/server/local-services/instance/service.ts +++ b/apps/meteor/ee/server/local-services/instance/service.ts @@ -164,7 +164,7 @@ export class InstanceService extends ServiceClassInternal implements IInstanceSe return; } - this.broker.broadcast('broadcast', { streamName, eventName, args }); + void this.broker.broadcast('broadcast', { streamName, eventName, args }); } async getInstances(): Promise<BrokerNode[]> { diff --git a/apps/meteor/ee/server/services/ecdh-proxy/lib/server.ts b/apps/meteor/ee/server/services/ecdh-proxy/lib/server.ts index 0381418155a..1f1528e9aae 100644 --- a/apps/meteor/ee/server/services/ecdh-proxy/lib/server.ts +++ b/apps/meteor/ee/server/services/ecdh-proxy/lib/server.ts @@ -193,7 +193,7 @@ app.use('/api/*', async (req, res) => { } try { - proxy(req, res, session); + void proxy(req, res, session); } catch (e) { res.status(400).send(e instanceof Error ? e.message : String(e)); } @@ -229,7 +229,7 @@ app.use('/sockjs/:id1/:id2/xhr_send', async (req, res) => { } try { - proxy(req, res, session, xhrDataRequestProcess, xhrDataResponseProcess); + void proxy(req, res, session, xhrDataRequestProcess, xhrDataResponseProcess); } catch (e) { res.status(400).send(e instanceof Error ? e.message : String(e)); } @@ -245,7 +245,7 @@ app.use('/sockjs/:id1/:id2/xhr', async (req, res) => { } try { - proxy(req, res, session, undefined, xhrDataResponseProcess); + void proxy(req, res, session, undefined, xhrDataResponseProcess); } catch (e) { res.status(400).send(e instanceof Error ? e.message : String(e)); } @@ -253,5 +253,5 @@ app.use('/sockjs/:id1/:id2/xhr', async (req, res) => { app.use((req, res) => { res.setHeader('Access-Control-Allow-Origin', '*'); - proxy(req, res); + void proxy(req, res); }); diff --git a/apps/meteor/ee/server/settings/deviceManagement.ts b/apps/meteor/ee/server/settings/deviceManagement.ts index 7dcdb53a285..bf9410d86a6 100644 --- a/apps/meteor/ee/server/settings/deviceManagement.ts +++ b/apps/meteor/ee/server/settings/deviceManagement.ts @@ -1,7 +1,7 @@ import { settingsRegistry } from '../../../app/settings/server'; export function addSettings(): void { - settingsRegistry.addGroup('Device_Management', function () { + void settingsRegistry.addGroup('Device_Management', function () { this.with( { enterprise: true, diff --git a/apps/meteor/ee/server/settings/ldap.ts b/apps/meteor/ee/server/settings/ldap.ts index 06638e61af6..2a9810eff92 100644 --- a/apps/meteor/ee/server/settings/ldap.ts +++ b/apps/meteor/ee/server/settings/ldap.ts @@ -1,7 +1,7 @@ import { settingsRegistry } from '../../../app/settings/server'; export function addSettings(): void { - settingsRegistry.addGroup('LDAP', function () { + void settingsRegistry.addGroup('LDAP', function () { const enableQuery = { _id: 'LDAP_Enable', value: true }; this.with( diff --git a/apps/meteor/ee/server/settings/saml.ts b/apps/meteor/ee/server/settings/saml.ts index 450b4c7c89a..718ddeeb3e5 100644 --- a/apps/meteor/ee/server/settings/saml.ts +++ b/apps/meteor/ee/server/settings/saml.ts @@ -12,7 +12,7 @@ import { } from '../../../app/meteor-accounts-saml/server/lib/constants'; export const addSettings = function (name: string): void { - settingsRegistry.addGroup('SAML', function () { + void settingsRegistry.addGroup('SAML', function () { this.with( { tab: 'SAML_Enterprise', diff --git a/apps/meteor/ee/server/settings/video-conference.ts b/apps/meteor/ee/server/settings/video-conference.ts index 8564f9d0087..8c23306b86f 100644 --- a/apps/meteor/ee/server/settings/video-conference.ts +++ b/apps/meteor/ee/server/settings/video-conference.ts @@ -1,7 +1,7 @@ import { settingsRegistry } from '../../../app/settings/server'; export function addSettings(): void { - settingsRegistry.addGroup('Video_Conference', function () { + void settingsRegistry.addGroup('Video_Conference', function () { this.with( { enterprise: true, diff --git a/apps/meteor/ee/server/startup/presence.ts b/apps/meteor/ee/server/startup/presence.ts index dc5351b878c..448b8d9f809 100644 --- a/apps/meteor/ee/server/startup/presence.ts +++ b/apps/meteor/ee/server/startup/presence.ts @@ -6,7 +6,7 @@ import { Presence } from '@rocket.chat/core-services'; // update connections count every 30 seconds const updateConns = throttle(function _updateConns() { - InstanceStatus.updateConnections(Meteor.server.sessions.size); + void InstanceStatus.updateConnections(Meteor.server.sessions.size); }, 30000); Meteor.startup(function () { @@ -33,13 +33,13 @@ Meteor.startup(function () { if (login.type !== 'resume') { return; } - Presence.newConnection(login.user._id, login.connection.id, nodeId); - - updateConns(); + void Presence.newConnection(login.user._id, login.connection.id, nodeId).then(() => { + updateConns(); + }); }); Accounts.onLogout(function (login: any): void { - Presence.removeConnection(login.user._id, login.connection.id, nodeId); + void Presence.removeConnection(login.user._id, login.connection.id, nodeId); updateConns(); }); diff --git a/apps/meteor/ee/server/startup/upsell.ts b/apps/meteor/ee/server/startup/upsell.ts index 8f9dfaf1ea2..4e5efa674b7 100644 --- a/apps/meteor/ee/server/startup/upsell.ts +++ b/apps/meteor/ee/server/startup/upsell.ts @@ -10,7 +10,7 @@ const handleHadTrial = (): void => { } if (license.meta?.trial) { - Settings.updateValueById('Cloud_Workspace_Had_Trial', true); + void Settings.updateValueById('Cloud_Workspace_Had_Trial', true); } }); }; diff --git a/apps/meteor/server/cron/federation.ts b/apps/meteor/server/cron/federation.ts index 6395e39391e..45afde04e45 100644 --- a/apps/meteor/server/cron/federation.ts +++ b/apps/meteor/server/cron/federation.ts @@ -12,12 +12,12 @@ function updateSetting(id: string, value: SettingValue | null): void { const setting = settings.get(id); if (setting === undefined) { - settingsRegistry.add(id, value); + void settingsRegistry.add(id, value); } else { - Settings.updateValueById(id, value); + void Settings.updateValueById(id, value); } } else { - Settings.updateValueById(id, null); + void Settings.updateValueById(id, null); } } @@ -58,7 +58,7 @@ async function runFederation(): Promise<void> { // Test if federation is healthy try { - dispatchEvent([getFederationDomain()], { + void dispatchEvent([getFederationDomain()], { type: eventTypes.PING, }); diff --git a/apps/meteor/server/cron/videoConferences.ts b/apps/meteor/server/cron/videoConferences.ts index da62aa28841..27f1d0232e7 100644 --- a/apps/meteor/server/cron/videoConferences.ts +++ b/apps/meteor/server/cron/videoConferences.ts @@ -18,7 +18,7 @@ async function runVideoConferences(): Promise<void> { } export function videoConferencesCron(syncedCron: typeof SyncedCron): void { - runVideoConferences(); + void runVideoConferences(); syncedCron.add({ name: 'VideoConferences', diff --git a/apps/meteor/server/email/IMAPInterceptor.ts b/apps/meteor/server/email/IMAPInterceptor.ts index e8cb7b8df27..dade9d36a58 100644 --- a/apps/meteor/server/email/IMAPInterceptor.ts +++ b/apps/meteor/server/email/IMAPInterceptor.ts @@ -55,7 +55,7 @@ export class IMAPInterceptor extends EventEmitter { }); this.retries = 0; this.inboxId = id; - this.start(); + void this.start(); } openInbox(): Promise<IMAP.Box> { diff --git a/apps/meteor/server/features/EmailInbox/EmailInbox.ts b/apps/meteor/server/features/EmailInbox/EmailInbox.ts index b2e87f3f593..f5e6ddc5509 100644 --- a/apps/meteor/server/features/EmailInbox/EmailInbox.ts +++ b/apps/meteor/server/features/EmailInbox/EmailInbox.ts @@ -67,7 +67,7 @@ export async function configureEmailInboxes(): Promise<void> { try { await EmailMessageHistory.create({ _id: email.messageId, email: emailInboxRecord.email }); - onEmailReceived(email, emailInboxRecord.email, emailInboxRecord.department); + void onEmailReceived(email, emailInboxRecord.email, emailInboxRecord.department); } catch (e: any) { // In case the email message history has been received by other instance.. logger.error(e); @@ -98,6 +98,6 @@ export async function configureEmailInboxes(): Promise<void> { Meteor.startup(() => { settings.watchOnce('Livechat_Routing_Method', (_) => { - configureEmailInboxes(); + void configureEmailInboxes(); }); }); diff --git a/apps/meteor/server/features/EmailInbox/EmailInbox_Outgoing.ts b/apps/meteor/server/features/EmailInbox/EmailInbox_Outgoing.ts index 88cbda50216..643a7abd08a 100644 --- a/apps/meteor/server/features/EmailInbox/EmailInbox_Outgoing.ts +++ b/apps/meteor/server/features/EmailInbox/EmailInbox_Outgoing.ts @@ -114,7 +114,7 @@ slashCommands.add({ FileUpload.getBuffer(file, (_err?: Error, buffer?: Buffer) => { !_err && buffer && - sendEmail( + void sendEmail( inbox, { to: room.email.replyTo, @@ -235,7 +235,7 @@ callbacks.add( return message; } - sendEmail( + void sendEmail( inbox, { text: match.groups.text, @@ -303,7 +303,7 @@ export async function sendTestEmailToInbox(emailInboxRecord: IEmailInbox, user: } logger.info(`Sending testing email to ${address}`); - sendEmail(inbox, { + void sendEmail(inbox, { to: address, subject: 'Test of inbox configuration', text: 'Test of inbox configuration successful', diff --git a/apps/meteor/server/methods/addRoomLeader.js b/apps/meteor/server/methods/addRoomLeader.js index 0a7a035e9fa..637c0fc086f 100644 --- a/apps/meteor/server/methods/addRoomLeader.js +++ b/apps/meteor/server/methods/addRoomLeader.js @@ -63,7 +63,7 @@ Meteor.methods({ } if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type: 'added', _id: 'leader', u: { diff --git a/apps/meteor/server/methods/addRoomModerator.js b/apps/meteor/server/methods/addRoomModerator.js index badc24ebdc1..40b1f87e42a 100644 --- a/apps/meteor/server/methods/addRoomModerator.js +++ b/apps/meteor/server/methods/addRoomModerator.js @@ -76,10 +76,10 @@ Meteor.methods({ }; if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', event); + void api.broadcast('user.roleUpdate', event); } - api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: Meteor.userId() }); + void api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: Meteor.userId() }); return true; }, diff --git a/apps/meteor/server/methods/addRoomOwner.js b/apps/meteor/server/methods/addRoomOwner.js index f8d66347be9..0c298ae96ce 100644 --- a/apps/meteor/server/methods/addRoomOwner.js +++ b/apps/meteor/server/methods/addRoomOwner.js @@ -74,9 +74,9 @@ Meteor.methods({ scope: rid, }; if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', event); + void api.broadcast('user.roleUpdate', event); } - api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: Meteor.userId() }); + void api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: Meteor.userId() }); return true; }, diff --git a/apps/meteor/server/methods/eraseRoom.ts b/apps/meteor/server/methods/eraseRoom.ts index 175d3b53e93..f2d35cb5bec 100644 --- a/apps/meteor/server/methods/eraseRoom.ts +++ b/apps/meteor/server/methods/eraseRoom.ts @@ -47,7 +47,7 @@ export async function eraseRoom(rid: string, uid: string): Promise<void> { } if (Apps?.isLoaded()) { - Apps.getBridges()?.getListenerBridge().roomEvent('IPostRoomDeleted', room); + void Apps.getBridges()?.getListenerBridge().roomEvent('IPostRoomDeleted', room); } } diff --git a/apps/meteor/server/methods/removeRoomLeader.js b/apps/meteor/server/methods/removeRoomLeader.js index 5845484d48b..886ae034afc 100644 --- a/apps/meteor/server/methods/removeRoomLeader.js +++ b/apps/meteor/server/methods/removeRoomLeader.js @@ -63,7 +63,7 @@ Meteor.methods({ } if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', { + void api.broadcast('user.roleUpdate', { type: 'removed', _id: 'leader', u: { diff --git a/apps/meteor/server/methods/removeRoomModerator.js b/apps/meteor/server/methods/removeRoomModerator.js index 0813181efe7..276f87e64e6 100644 --- a/apps/meteor/server/methods/removeRoomModerator.js +++ b/apps/meteor/server/methods/removeRoomModerator.js @@ -75,9 +75,9 @@ Meteor.methods({ scope: rid, }; if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', event); + void api.broadcast('user.roleUpdate', event); } - api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: Meteor.userId() }); + void api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: Meteor.userId() }); return true; }, diff --git a/apps/meteor/server/methods/removeRoomOwner.ts b/apps/meteor/server/methods/removeRoomOwner.ts index 9cb44e08db9..ea50aa9a361 100644 --- a/apps/meteor/server/methods/removeRoomOwner.ts +++ b/apps/meteor/server/methods/removeRoomOwner.ts @@ -84,9 +84,9 @@ Meteor.methods({ scope: rid, }; if (settings.get('UI_DisplayRoles')) { - api.broadcast('user.roleUpdate', event); + void api.broadcast('user.roleUpdate', event); } - api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: uid }); + void api.broadcast('federation.userRoleChanged', { ...event, givenByUserId: uid }); return true; }, }); diff --git a/apps/meteor/server/methods/resetAvatar.js b/apps/meteor/server/methods/resetAvatar.js index 3b7b085fda9..d1f1cddb24d 100644 --- a/apps/meteor/server/methods/resetAvatar.js +++ b/apps/meteor/server/methods/resetAvatar.js @@ -44,7 +44,7 @@ Meteor.methods({ FileUpload.getStore('Avatars').deleteByName(user.username); Users.unsetAvatarData(user._id); - api.broadcast('user.avatarUpdate', { username: user.username, avatarETag: null }); + void api.broadcast('user.avatarUpdate', { username: user.username, avatarETag: null }); }, }); diff --git a/apps/meteor/server/modules/streamer/streamer.module.ts b/apps/meteor/server/modules/streamer/streamer.module.ts index faa80c7e655..dc33e69304f 100644 --- a/apps/meteor/server/modules/streamer/streamer.module.ts +++ b/apps/meteor/server/modules/streamer/streamer.module.ts @@ -263,7 +263,7 @@ export abstract class Streamer extends EventEmitter implements IStreamer { } if (transform) { - this.sendToManySubscriptions(subscriptions, origin, eventName, args, transform); + void this.sendToManySubscriptions(subscriptions, origin, eventName, args, transform); return true; } @@ -277,7 +277,7 @@ export abstract class Streamer extends EventEmitter implements IStreamer { return false; } - this.sendToManySubscriptions(subscriptions, origin, eventName, args, msg); + void this.sendToManySubscriptions(subscriptions, origin, eventName, args, msg); return true; } diff --git a/apps/meteor/server/modules/watchers/watchers.module.ts b/apps/meteor/server/modules/watchers/watchers.module.ts index cc6a50d06bc..e2ff3c91ae5 100644 --- a/apps/meteor/server/modules/watchers/watchers.module.ts +++ b/apps/meteor/server/modules/watchers/watchers.module.ts @@ -105,7 +105,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb } } - broadcast('watch.messages', { clientAction, message }); + void broadcast('watch.messages', { clientAction, message }); } break; } @@ -126,7 +126,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb if (!subscription) { return; } - broadcast('watch.subscriptions', { clientAction, subscription }); + void broadcast('watch.subscriptions', { clientAction, subscription }); break; } @@ -135,7 +135,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb projection: { u: 1, rid: 1 }, }); const subscription = trash || { _id: id }; - broadcast('watch.subscriptions', { clientAction, subscription }); + void broadcast('watch.subscriptions', { clientAction, subscription }); break; } } @@ -153,7 +153,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.roles', { + void broadcast('watch.roles', { clientAction: clientAction !== 'removed' ? ('changed' as const) : clientAction, role, }); @@ -175,7 +175,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.inquiries', { clientAction, inquiry: data, diff }); + void broadcast('watch.inquiries', { clientAction, inquiry: data, diff }); }); watcher.on<ILivechatDepartmentAgents>(LivechatDepartmentAgents.getCollectionName(), async ({ clientAction, id, diff }) => { @@ -186,7 +186,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb if (!data) { return; } - broadcast('watch.livechatDepartmentAgents', { clientAction, id, data, diff }); + void broadcast('watch.livechatDepartmentAgents', { clientAction, id, data, diff }); return; } @@ -196,7 +196,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb if (!data) { return; } - broadcast('watch.livechatDepartmentAgents', { clientAction, id, data, diff }); + void broadcast('watch.livechatDepartmentAgents', { clientAction, id, data, diff }); }); watcher.on<IPermission>(Permissions.getCollectionName(), async ({ clientAction, id, data: eventData, diff }) => { @@ -220,7 +220,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('permission.changed', { clientAction, data }); + void broadcast('permission.changed', { clientAction, data }); if (data.level === 'settings' && data.settingId) { // if the permission changes, the effect on the visible settings depends on the role affected. @@ -230,7 +230,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb if (!setting) { return; } - broadcast('watch.settings', { clientAction: 'updated', setting }); + void broadcast('watch.settings', { clientAction: 'updated', setting }); } }); @@ -258,12 +258,12 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.settings', { clientAction, setting }); + void broadcast('watch.settings', { clientAction, setting }); }); watcher.on<IRoom>(Rooms.getCollectionName(), async ({ clientAction, id, data, diff }) => { if (clientAction === 'removed') { - broadcast('watch.rooms', { clientAction, room: { _id: id } }); + void broadcast('watch.rooms', { clientAction, room: { _id: id } }); return; } @@ -276,7 +276,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.rooms', { clientAction, room }); + void broadcast('watch.rooms', { clientAction, room }); }); // TODO: Prevent flood from database on username change, what causes changes on all past messages from that user @@ -288,7 +288,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.users', { clientAction, data, diff, unset, id }); + void broadcast('watch.users', { clientAction, data, diff, unset, id }); }); watcher.on<ILoginServiceConfiguration>(LoginServiceConfiguration.getCollectionName(), async ({ clientAction, id }) => { @@ -297,11 +297,11 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.loginServiceConfiguration', { clientAction, data, id }); + void broadcast('watch.loginServiceConfiguration', { clientAction, data, id }); }); watcher.on<IInstanceStatus>(InstanceStatus.getCollectionName(), ({ clientAction, id, data, diff }) => { - broadcast('watch.instanceStatus', { clientAction, data, diff, id }); + void broadcast('watch.instanceStatus', { clientAction, data, diff, id }); }); watcher.on<IIntegrationHistory>(IntegrationHistory.getCollectionName(), async ({ clientAction, id, data, diff }) => { @@ -313,14 +313,14 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb if (!history?.integration) { return; } - broadcast('watch.integrationHistory', { clientAction, data: history, diff, id }); + void broadcast('watch.integrationHistory', { clientAction, data: history, diff, id }); break; } case 'inserted': { if (!data) { return; } - broadcast('watch.integrationHistory', { clientAction, data, diff, id }); + void broadcast('watch.integrationHistory', { clientAction, data, diff, id }); break; } } @@ -328,7 +328,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb watcher.on<IIntegration>(Integrations.getCollectionName(), async ({ clientAction, id, data: eventData }) => { if (clientAction === 'removed') { - broadcast('watch.integrations', { clientAction, id, data: { _id: id } }); + void broadcast('watch.integrations', { clientAction, id, data: { _id: id } }); return; } @@ -337,12 +337,12 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.integrations', { clientAction, data, id }); + void broadcast('watch.integrations', { clientAction, data, id }); }); watcher.on<IEmailInbox>(EmailInbox.getCollectionName(), async ({ clientAction, id, data: eventData }) => { if (clientAction === 'removed') { - broadcast('watch.emailInbox', { clientAction, id, data: { _id: id } }); + void broadcast('watch.emailInbox', { clientAction, id, data: { _id: id } }); return; } @@ -351,7 +351,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.emailInbox', { clientAction, data, id }); + void broadcast('watch.emailInbox', { clientAction, data, id }); }); watcher.on<IPbxEvent>(PbxEvents.getCollectionName(), async ({ clientAction, id, data: eventData }) => { @@ -364,7 +364,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb return; } - broadcast('watch.pbxevents', { clientAction, data, id }); + void broadcast('watch.pbxevents', { clientAction, data, id }); } }); @@ -381,7 +381,7 @@ export function initWatchers(watcher: DatabaseWatcher, broadcast: BroadcastCallb // This solves the problem of broadcasting, since now, watcher is the one in charge of doing it. // What i don't like is the idea of giving more responsibilities to watcher, even when this works - broadcast('watch.priorities', { clientAction, data, id, diff }); + void broadcast('watch.priorities', { clientAction, data, id, diff }); }); watcherStarted = true; diff --git a/apps/meteor/server/services/banner/service.ts b/apps/meteor/server/services/banner/service.ts index 36eb388ccae..5ed0fc2275c 100644 --- a/apps/meteor/server/services/banner/service.ts +++ b/apps/meteor/server/services/banner/service.ts @@ -42,7 +42,7 @@ export class BannerService extends ServiceClassInternal implements IBannerServic throw new Error('error-creating-banner'); } - api.broadcast('banner.new', banner._id); + void api.broadcast('banner.new', banner._id); return banner; } @@ -108,7 +108,7 @@ export class BannerService extends ServiceClassInternal implements IBannerServic const result = await Banners.disable(bannerId); if (result) { - api.broadcast('banner.disabled', bannerId); + void api.broadcast('banner.disabled', bannerId); return true; } return false; @@ -125,7 +125,7 @@ export class BannerService extends ServiceClassInternal implements IBannerServic Banners.updateOne({ _id }, { $set: { ...banner, ...doc, active: true } }); // reenable the banner - api.broadcast('banner.enabled', bannerId); + void api.broadcast('banner.enabled', bannerId); return true; } } diff --git a/apps/meteor/server/services/federation/application/user/receiver/UserServiceReceiver.ts b/apps/meteor/server/services/federation/application/user/receiver/UserServiceReceiver.ts index 310b8ad51bc..8540de4a576 100644 --- a/apps/meteor/server/services/federation/application/user/receiver/UserServiceReceiver.ts +++ b/apps/meteor/server/services/federation/application/user/receiver/UserServiceReceiver.ts @@ -59,7 +59,7 @@ export class FederationUserServiceReceiver extends AbstractFederationApplication this.usersTypingByRoomIdCache.set( externalRoomId, federatedUsers.map((federatedUser) => { - this.internalNotificationAdapter.notifyUserTypingOnRoom( + void this.internalNotificationAdapter.notifyUserTypingOnRoom( federatedRoom.getInternalId(), federatedUser.getUsername() as string, isTyping, diff --git a/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Notification.ts b/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Notification.ts index d6dd9843171..4bd19339fe6 100644 --- a/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Notification.ts +++ b/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Notification.ts @@ -29,7 +29,7 @@ export class RocketChatNotificationAdapter { } public async broadcastUserTypingOnRoom(username: string, activity: string[], roomId: string): Promise<void> { - api.broadcast('user.typing', { + void api.broadcast('user.typing', { user: { username }, isTyping: activity.includes('user-typing'), roomId, @@ -37,7 +37,7 @@ export class RocketChatNotificationAdapter { } public notifyWithEphemeralMessage(i18nMessageKey: string, userId: string, roomId: string, language = 'en'): void { - api.broadcast('notify.ephemeralMessage', userId, roomId, { + void api.broadcast('notify.ephemeralMessage', userId, roomId, { msg: TAPi18n.__(i18nMessageKey, { postProcess: 'sprintf', lng: language, diff --git a/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts b/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts index 5193a38d2c3..74b1d0b3f6d 100644 --- a/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts +++ b/apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts @@ -172,7 +172,7 @@ export class RocketChatSettingsAdapter { private addFederationSettings(): void { const preExistingConfiguration = this.getRegistrationFileFromHomeserver(); - settingsRegistry.addGroup('Federation', function () { + void settingsRegistry.addGroup('Federation', function () { this.section('Matrix Bridge', function () { this.add('Federation_Matrix_enabled', Boolean(preExistingConfiguration), { readonly: false, diff --git a/apps/meteor/server/services/meteor/service.ts b/apps/meteor/server/services/meteor/service.ts index a122e87595f..35f5a1fb152 100644 --- a/apps/meteor/server/services/meteor/service.ts +++ b/apps/meteor/server/services/meteor/service.ts @@ -236,11 +236,11 @@ export class MeteorService extends ServiceClassInternal implements IMeteor { Meteor.server.publish_handlers.meteor_autoupdate_clientVersions.call({ added(_collection: string, _id: string, version: AutoUpdateRecord) { clientVersionsStore.set(_id, version); - api.broadcast('meteor.clientVersionUpdated', version); + void api.broadcast('meteor.clientVersionUpdated', version); }, changed(_collection: string, _id: string, version: AutoUpdateRecord) { clientVersionsStore.set(_id, version); - api.broadcast('meteor.clientVersionUpdated', version); + void api.broadcast('meteor.clientVersionUpdated', version); }, onStop() { // diff --git a/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts b/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts index 4bd28b62a0b..541e60acdb4 100644 --- a/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts +++ b/apps/meteor/server/services/omnichannel-integrations/providers/twilio.ts @@ -40,7 +40,7 @@ const isTwilioData = (data: unknown): data is TwilioData => { const MAX_FILE_SIZE = 5242880; const notifyAgent = (userId: string, rid: string, msg: string) => - api.broadcast('notify.ephemeralMessage', userId, rid, { + void api.broadcast('notify.ephemeralMessage', userId, rid, { msg, }); diff --git a/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts b/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts index 066d696de8c..2b4c843b955 100644 --- a/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts +++ b/apps/meteor/server/services/omnichannel-integrations/providers/voxtelesys.ts @@ -31,7 +31,7 @@ const isVoxtelesysData = (data: unknown): data is VoxtelesysData => { const MAX_FILE_SIZE = 5242880; const notifyAgent = (userId: string, rid: string, msg: string) => - api.broadcast('notify.ephemeralMessage', userId, rid, { + void api.broadcast('notify.ephemeralMessage', userId, rid, { msg, }); diff --git a/apps/meteor/server/services/omnichannel-voip/service.ts b/apps/meteor/server/services/omnichannel-voip/service.ts index 0dd2ef68e90..7e3b1c01e27 100644 --- a/apps/meteor/server/services/omnichannel-voip/service.ts +++ b/apps/meteor/server/services/omnichannel-voip/service.ts @@ -62,7 +62,7 @@ export class OmnichannelVoipService extends ServiceClassInternal implements IOmn return; } this.logger.debug(`Notifying agent ${agent._id} of hangup on room ${currentRoom._id}`); - api.broadcast('call.callerhangup', agent._id, { roomId: currentRoom._id }); + void api.broadcast('call.callerhangup', agent._id, { roomId: currentRoom._id }); } private async processAgentDisconnect(extension: string): Promise<void> { diff --git a/apps/meteor/server/services/startup.ts b/apps/meteor/server/services/startup.ts index bf37d9c2c99..004d4f25a4b 100644 --- a/apps/meteor/server/services/startup.ts +++ b/apps/meteor/server/services/startup.ts @@ -56,7 +56,7 @@ api.registerService(new OmnichannelIntegrationService()); // if the process is running in micro services mode we don't need to register services that will run separately if (!isRunningMs()) { - (async (): Promise<void> => { + void (async (): Promise<void> => { const { Presence } = await import('@rocket.chat/presence'); const { Authorization } = await import('./authorization/service'); diff --git a/apps/meteor/server/services/video-conference/service.ts b/apps/meteor/server/services/video-conference/service.ts index 986660dfbe7..68b3afca0eb 100644 --- a/apps/meteor/server/services/video-conference/service.ts +++ b/apps/meteor/server/services/video-conference/service.ts @@ -415,7 +415,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf action: string, params: { uid: IUser['_id']; rid: IRoom['_id']; callId: VideoConference['_id'] }, ): void { - api.broadcast('user.video-conference', { userId, action, params }); + void api.broadcast('user.video-conference', { userId, action, params }); } private notifyVideoConfUpdate(rid: IRoom['_id'], callId: VideoConference['_id']): void { @@ -529,7 +529,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf lng: language, }); - api.broadcast('notify.ephemeralMessage', uid, rid, { + void api.broadcast('notify.ephemeralMessage', uid, rid, { msg, }); } diff --git a/apps/meteor/server/services/voip/connector/asterisk/ami/ContinuousMonitor.ts b/apps/meteor/server/services/voip/connector/asterisk/ami/ContinuousMonitor.ts index 30744ce888d..9279379fbdb 100644 --- a/apps/meteor/server/services/voip/connector/asterisk/ami/ContinuousMonitor.ts +++ b/apps/meteor/server/services/voip/connector/asterisk/ami/ContinuousMonitor.ts @@ -99,9 +99,9 @@ export class ContinuousMonitor extends Command { }); if (user) { if (isIQueueMemberAddedEvent(event)) { - api.broadcast(`voip.events`, user._id, { data: { queue, queuedCalls: calls }, event: 'queue-member-added' }); + void api.broadcast(`voip.events`, user._id, { data: { queue, queuedCalls: calls }, event: 'queue-member-added' }); } else if (isIQueueMemberRemovedEvent(event)) { - api.broadcast(`voip.events`, user._id, { event: 'queue-member-removed', data: { queue, queuedCalls: calls } }); + void api.broadcast(`voip.events`, user._id, { event: 'queue-member-removed', data: { queue, queuedCalls: calls } }); } } } @@ -128,7 +128,7 @@ export class ContinuousMonitor extends Command { name: event.calleridname, }; - api.broadcast('voip.events', user._id, { event: 'agent-called', data: { callerId, queue: event.queue } }); + void api.broadcast('voip.events', user._id, { event: 'agent-called', data: { callerId, queue: event.queue } }); // api.broadcast('queue.agentcalled', user._id, event.queue, callerId); } @@ -190,7 +190,10 @@ export class ContinuousMonitor extends Command { await this.storePbxEvent(event, 'QueueCallerJoin'); this.logger.debug(`Broadcasting event queue.callerjoined to ${members.length} agents on queue ${event.queue}`); members.forEach((m) => { - api.broadcast('voip.events', m, { event: 'caller-joined', data: { callerId, queue: event.queue, queuedCalls: event.count } }); + void api.broadcast('voip.events', m, { + event: 'caller-joined', + data: { callerId, queue: event.queue, queuedCalls: event.count }, + }); }); break; } @@ -199,7 +202,7 @@ export class ContinuousMonitor extends Command { await this.storePbxEvent(event, 'QueueCallerAbandon'); this.logger.debug(`Broadcasting event queue.callabandoned to ${members.length} agents on queue ${event.queue}`); members.forEach((m) => { - api.broadcast('voip.events', m, { event: 'call-abandoned', data: { queue: event.queue, queuedCallAfterAbandon: calls } }); + void api.broadcast('voip.events', m, { event: 'call-abandoned', data: { queue: event.queue, queuedCallAfterAbandon: calls } }); }); break; } @@ -210,7 +213,7 @@ export class ContinuousMonitor extends Command { this.logger.debug(`Broadcasting event queue.agentconnected to ${members.length} agents on queue ${event.queue}`); members.forEach((m) => { // event.holdtime signifies wait time in the queue. - api.broadcast('voip.events', m, { + void api.broadcast('voip.events', m, { event: 'agent-connected', data: { queue: event.queue, queuedCalls: calls, waitTimeInQueue: event.holdtime }, }); diff --git a/apps/meteor/server/services/voip/service.ts b/apps/meteor/server/services/voip/service.ts index 7adee6599aa..8e4a79725b0 100644 --- a/apps/meteor/server/services/voip/service.ts +++ b/apps/meteor/server/services/voip/service.ts @@ -41,7 +41,7 @@ export class VoipService extends ServiceClassInternal implements IVoipService { } // Init from constructor if we already have // voip enabled by default while starting the server - this.init(); + void this.init(); } async init(): Promise<void> { @@ -54,7 +54,7 @@ export class VoipService extends ServiceClassInternal implements IVoipService { try { await this.commandHandler.initConnection(CommandType.AMI); this.active = true; - api.broadcast('connector.statuschanged', true); + void api.broadcast('connector.statuschanged', true); this.logger.info('VoIP service started'); } catch (err) { this.logger.error({ msg: 'Error initializing VOIP service', err }); @@ -71,7 +71,7 @@ export class VoipService extends ServiceClassInternal implements IVoipService { try { this.commandHandler.stop(); this.active = false; - api.broadcast('connector.statuschanged', false); + void api.broadcast('connector.statuschanged', false); this.logger.info('VoIP service stopped'); } catch (err) { this.logger.error({ msg: 'Error stopping VoIP service', err }); diff --git a/apps/meteor/server/settings/ldap.ts b/apps/meteor/server/settings/ldap.ts index 93625790417..7706c6f801d 100644 --- a/apps/meteor/server/settings/ldap.ts +++ b/apps/meteor/server/settings/ldap.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../app/settings/server'; -settingsRegistry.addGroup('LDAP', function () { +void settingsRegistry.addGroup('LDAP', function () { const enableQuery = { _id: 'LDAP_Enable', value: true }; const adOnly = { _id: 'LDAP_Server_Type', value: 'ad' }; const ldapOnly = { _id: 'LDAP_Server_Type', value: '' }; diff --git a/apps/meteor/server/settings/userDataDownload.ts b/apps/meteor/server/settings/userDataDownload.ts index 335856fde82..3c7fcf126fb 100644 --- a/apps/meteor/server/settings/userDataDownload.ts +++ b/apps/meteor/server/settings/userDataDownload.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../app/settings/server'; -settingsRegistry.addGroup('UserDataDownload', function () { +void settingsRegistry.addGroup('UserDataDownload', function () { this.add('UserData_EnableDownload', true, { type: 'boolean', public: true, diff --git a/apps/meteor/server/settings/video-conference.ts b/apps/meteor/server/settings/video-conference.ts index ae5fc03032d..8e279aaefdf 100644 --- a/apps/meteor/server/settings/video-conference.ts +++ b/apps/meteor/server/settings/video-conference.ts @@ -1,6 +1,6 @@ import { settingsRegistry } from '../../app/settings/server'; -settingsRegistry.addGroup('Video_Conference', function () { +void settingsRegistry.addGroup('Video_Conference', function () { this.add('VideoConf_Default_Provider', '', { type: 'lookup', lookupEndpoint: 'v1/video-conference.providers', diff --git a/apps/meteor/server/startup/localServices.ts b/apps/meteor/server/startup/localServices.ts index e1ab692bb2b..ee09e0f001a 100644 --- a/apps/meteor/server/startup/localServices.ts +++ b/apps/meteor/server/startup/localServices.ts @@ -9,4 +9,4 @@ broker.onBroadcast((eventName: string, args: unknown[]) => { }); api.setBroker(broker); -api.start(); +void api.start(); diff --git a/apps/meteor/tests/e2e/e2e-encryption.spec.ts b/apps/meteor/tests/e2e/e2e-encryption.spec.ts index ffd636f7338..ed7ee82fa38 100644 --- a/apps/meteor/tests/e2e/e2e-encryption.spec.ts +++ b/apps/meteor/tests/e2e/e2e-encryption.spec.ts @@ -148,7 +148,7 @@ test.describe.serial('e2e-encryption', () => { await poHomeChannel.sidenav.openNewByLabel('Channel'); await poHomeChannel.sidenav.inputChannelName.type(channelName); - await poHomeChannel.sidenav.checkboxEncryption.check({ force: true }); + await poHomeChannel.sidenav.checkboxEncryption.click(); await poHomeChannel.sidenav.btnCreate.click(); await expect(page).toHaveURL(`/group/${channelName}`); diff --git a/apps/meteor/tests/e2e/fixtures/userStates.ts b/apps/meteor/tests/e2e/fixtures/userStates.ts index 3dbb6a3ef95..260c84e8748 100644 --- a/apps/meteor/tests/e2e/fixtures/userStates.ts +++ b/apps/meteor/tests/e2e/fixtures/userStates.ts @@ -2,6 +2,8 @@ import crypto from 'crypto'; import type { BrowserContextOptions, Page } from '@playwright/test'; +import { BASE_URL } from '../config/constants'; + export type IUserState = { data: { @@ -56,7 +58,7 @@ function generateContext(username: string) : IUserState { ], "origins": [ { - "origin": "http://localhost:3000", + "origin": BASE_URL, "localStorage": [ { "name": "userLanguage", diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts index e87198b5699..db782173347 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts @@ -14,7 +14,7 @@ export class HomeSidenav { } get checkboxEncryption(): Locator { - return this.page.locator('role=dialog[name="Create Channel"] >> role=checkbox[name="Encrypted"]'); + return this.page.locator('role=dialog[name="Create Channel"] >> role=checkbox[name="Encrypted"]').locator('..'); } get checkboxReadOnly(): Locator { diff --git a/apps/meteor/tests/unit/app/settings/server/functions/settings.tests.ts b/apps/meteor/tests/unit/app/settings/server/functions/settings.tests.ts index 96def7faba7..0095b0366fb 100644 --- a/apps/meteor/tests/unit/app/settings/server/functions/settings.tests.ts +++ b/apps/meteor/tests/unit/app/settings/server/functions/settings.tests.ts @@ -400,7 +400,7 @@ describe('Settings', () => { settings.watchByRegex(/setting_callback/gi, spiedCallback2, { debounce: 1 }); settings.initialized(); - settingsRegistry.addGroup('group', function () { + void settingsRegistry.addGroup('group', function () { this.section('section', function () { this.add('setting_callback', 'value2', { type: 'string', diff --git a/ee/apps/ddp-streamer/src/Streamer.ts b/ee/apps/ddp-streamer/src/Streamer.ts index e20bc4e4b32..60d967d7bc8 100644 --- a/ee/apps/ddp-streamer/src/Streamer.ts +++ b/ee/apps/ddp-streamer/src/Streamer.ts @@ -8,7 +8,7 @@ import { isEmpty } from './lib/utils'; import { Streamer, StreamerCentral } from '../../../../apps/meteor/server/modules/streamer/streamer.module'; StreamerCentral.on('broadcast', (name, eventName, args) => { - api.broadcast('stream', [name, eventName, args]); + void api.broadcast('stream', [name, eventName, args]); }); export class Stream extends Streamer { diff --git a/packages/eslint-config/best-practices/index.js b/packages/eslint-config/best-practices/index.js index 67fce7e982f..28f86b76a50 100644 --- a/packages/eslint-config/best-practices/index.js +++ b/packages/eslint-config/best-practices/index.js @@ -267,7 +267,7 @@ module.exports = { // disallow use of void operator // https://eslint.org/docs/rules/no-void - 'no-void': 'error', + 'no-void': 'off', // // disallow usage of configurable warning terms in comments: e.g. todo // 'no-warning-comments': ['off', { terms: ['todo', 'fixme', 'xxx'], location: 'start' }], -- GitLab