Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/apps/lib/misc/transformMappedData.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ export const transformMappedData = (data, map) => {
if (typeof result !== 'undefined') {
transformedData[to] = result;
}
} else if (typeof from === 'string' && typeof originalData[from] !== 'undefined') {
transformedData[to] = originalData[from];
} else if (typeof from === 'string') {
if (typeof originalData[from] !== 'undefined') {
transformedData[to] = originalData[from];
}
delete originalData[from];
}
});
Expand Down
1 change: 1 addition & 0 deletions app/lib/server/functions/sendMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const validateMessage = (message) => {
emoji: String,
avatar: ValidPartialURLParam,
attachments: [Match.Any],
blocks: [Match.Any],
}));

if (Array.isArray(message.attachments) && message.attachments.length) {
Expand Down