diff --git a/apps/meteor/app/lib/server/methods/updateMessage.ts b/apps/meteor/app/lib/server/methods/updateMessage.ts index 470fe0760b6d..161a168a2cdc 100644 --- a/apps/meteor/app/lib/server/methods/updateMessage.ts +++ b/apps/meteor/app/lib/server/methods/updateMessage.ts @@ -10,7 +10,7 @@ import { hasPermissionAsync } from '../../../authorization/server/functions/hasP import { settings } from '../../../settings/server'; import { updateMessage } from '../functions/updateMessage'; -const allowedEditedFields = ['tshow', 'alias', 'attachments', 'avatar', 'emoji', 'msg', 'customFields']; +const allowedEditedFields = ['tshow', 'alias', 'attachments', 'avatar', 'emoji', 'msg', 'customFields', 'content']; export async function executeUpdateMessage(uid: IUser['_id'], message: AtLeast, previewUrls?: string[]) { const originalMessage = await Messages.findOneById(message._id); diff --git a/apps/meteor/client/lib/chats/flows/processMessageEditing.ts b/apps/meteor/client/lib/chats/flows/processMessageEditing.ts index 029c56ff6d28..d152f47f4096 100644 --- a/apps/meteor/client/lib/chats/flows/processMessageEditing.ts +++ b/apps/meteor/client/lib/chats/flows/processMessageEditing.ts @@ -17,7 +17,7 @@ export const processMessageEditing = async ( return false; } - if (!message.msg && !message.attachments?.length) { + if (!message.msg && !message.attachments?.length && !message.content) { return false; } diff --git a/apps/meteor/client/lib/chats/flows/sendMessage.ts b/apps/meteor/client/lib/chats/flows/sendMessage.ts index e56acf06402c..4df46c84b05b 100644 --- a/apps/meteor/client/lib/chats/flows/sendMessage.ts +++ b/apps/meteor/client/lib/chats/flows/sendMessage.ts @@ -22,16 +22,16 @@ const process = async (chat: ChatAPI, message: IMessage, previewUrls?: string[], return; } - if (await processMessageEditing(chat, message, previewUrls)) { - return; - } - if (isSlashCommandAllowed && (await processSlashCommand(chat, message))) { return; } message = (await onClientBeforeSendMessage(message)) as IMessage; + if (await processMessageEditing(chat, message, previewUrls)) { + return; + } + await sdk.call('sendMessage', message, previewUrls); };