diff --git a/apps/meteor/app/assets/server/assets.ts b/apps/meteor/app/assets/server/assets.ts index b4d14cf652a..08e2ca22ca2 100644 --- a/apps/meteor/app/assets/server/assets.ts +++ b/apps/meteor/app/assets/server/assets.ts @@ -16,6 +16,7 @@ import { getURL } from '../../utils/lib/getURL'; import { getExtension } from '../../utils/lib/mimeTypes'; import { hasPermission } from '../../authorization/server'; import { RocketChatFile } from '../../file'; +import { methodDeprecationLogger } from '../../lib/server/lib/deprecationWarningLogger'; const RocketChatAssetsInstance = new RocketChatFile.GridFS({ name: 'assets', @@ -416,6 +417,8 @@ WebAppHashing.calculateClientHash = function (manifest, includeFilter, runtimeCo Meteor.methods({ refreshClients() { + methodDeprecationLogger.warn('refreshClients will be deprecated in future versions of Rocket.Chat'); + if (!Meteor.userId()) { throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'refreshClients', diff --git a/apps/meteor/client/views/admin/settings/groups/AssetsGroupPage.tsx b/apps/meteor/client/views/admin/settings/groups/AssetsGroupPage.tsx index 8445689846e..c408f34531f 100644 --- a/apps/meteor/client/views/admin/settings/groups/AssetsGroupPage.tsx +++ b/apps/meteor/client/views/admin/settings/groups/AssetsGroupPage.tsx @@ -1,6 +1,4 @@ import { ISetting } from '@rocket.chat/core-typings'; -import { Button } from '@rocket.chat/fuselage'; -import { useToastMessageDispatch, useMethod, useTranslation } from '@rocket.chat/ui-contexts'; import React, { memo, ReactElement } from 'react'; import { useEditableSettingsGroupSections } from '../../EditableSettingsContext'; @@ -12,33 +10,9 @@ type AssetsGroupPageProps = ISetting; function AssetsGroupPage({ _id, ...group }: AssetsGroupPageProps): ReactElement { const sections = useEditableSettingsGroupSections(_id); const solo = sections.length === 1; - const t = useTranslation(); - - const refreshClients = useMethod('refreshClients'); - const dispatchToastMessage = useToastMessageDispatch(); - - const handleApplyAndRefreshAllClientsButtonClick = async (): Promise => { - try { - await refreshClients(); - dispatchToastMessage({ - type: 'success', - message: t('Clients_will_refresh_in_a_few_seconds'), - }); - } catch (error) { - dispatchToastMessage({ type: 'error', message: error }); - } - }; return ( - - - - } - > + {sections.map((sectionName) => (
))}