Skip to content

Commit bb1ddd3

Browse files
committed
Reapply "chore!: remove insertOrUpdateSound and uploadCustomSound Meteor methods (#40476)"
This reverts commit 83f1191.
1 parent fd7a318 commit bb1ddd3

6 files changed

Lines changed: 15 additions & 70 deletions

File tree

.changeset/stale-meals-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': major
3+
---
4+
5+
Removes insertOrUpdateSound and uploadCustomSound Meteor methods
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import './startup/custom-sounds';
22
import './methods/deleteCustomSound';
3-
import './methods/insertOrUpdateSound';
43
import './methods/listCustomSounds';
5-
import './methods/uploadCustomSound';

apps/meteor/app/custom-sounds/server/lib/insertOrUpdateSound.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ import { api } from '@rocket.chat/core-services';
22
import { CustomSounds } from '@rocket.chat/models';
33
import { Meteor } from 'meteor/meteor';
44

5-
import type { ICustomSoundData } from '../methods/insertOrUpdateSound';
65
import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds';
76

7+
export type ICustomSoundData = {
8+
_id?: string;
9+
name: string;
10+
extension: string;
11+
previousName?: string;
12+
previousExtension?: string;
13+
newFile?: boolean;
14+
};
15+
816
export const insertOrUpdateSound = async (soundData: ICustomSoundData): Promise<string> => {
917
// silently strip colon; this allows for uploading :soundname: as soundname
1018
soundData.name = (soundData.name || '').replace(/:/g, '');

apps/meteor/app/custom-sounds/server/lib/uploadCustomSound.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { api } from '@rocket.chat/core-services';
22
import type { RequiredField } from '@rocket.chat/core-typings';
33

4+
import type { ICustomSoundData } from './insertOrUpdateSound';
45
import { RocketChatFile } from '../../../file/server';
5-
import type { ICustomSoundData } from '../methods/insertOrUpdateSound';
66
import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds';
77

88
export const uploadCustomSound = async (

apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)