Skip metadata initialization for verified-change
messages
This commit is contained in:
@@ -9,6 +9,10 @@ import { Message } from '../Message';
|
|||||||
export const initializeAttachmentMetadata = async (
|
export const initializeAttachmentMetadata = async (
|
||||||
message: Message
|
message: Message
|
||||||
): Promise<Message> => {
|
): Promise<Message> => {
|
||||||
|
if (message.type === 'verified-change') {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
const numAttachments = message.attachments.length;
|
const numAttachments = message.attachments.length;
|
||||||
const [numVisualMediaAttachments, numFileAttachments] = partition(
|
const [numVisualMediaAttachments, numFileAttachments] = partition(
|
||||||
message.attachments,
|
message.attachments,
|
||||||
|
Reference in New Issue
Block a user