Skip to content

Commit 77e52b1

Browse files
committed
fix: sendMessage filesToConfirm check
1 parent 9517a63 commit 77e52b1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

apps/meteor/app/lib/server/methods/sendMessage.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { api } from '@rocket.chat/core-services';
2-
import type { AtLeast, IMessage, IUser, IUploadToConfirm } from '@rocket.chat/core-typings';
2+
import { type AtLeast, type IMessage, type IUser, type IUploadToConfirm } from '@rocket.chat/core-typings';
33
import type { ServerMethods } from '@rocket.chat/ddp-client';
44
import type { RocketchatI18nKeys } from '@rocket.chat/i18n';
55
import { MessageTypes } from '@rocket.chat/message-types';
@@ -146,10 +146,20 @@ Meteor.methods<ServerMethods>({
146146
Match.ObjectIncluding({
147147
_id: String,
148148
name: Match.Maybe(String),
149-
content: Match.Maybe({
150-
algorithm: String,
151-
ciphertext: String,
152-
}),
149+
content: Match.Maybe(
150+
Match.OneOf(
151+
{
152+
algorithm: 'rc.v1.aes-sha2',
153+
ciphertext: String,
154+
},
155+
{
156+
algorithm: 'rc.v2.aes-sha2',
157+
ciphertext: String,
158+
kid: String,
159+
iv: String,
160+
}
161+
)
162+
),
153163
}),
154164
]),
155165
);

0 commit comments

Comments
 (0)