ofo port d.jsv11 code to v12

This commit is contained in:
Lamp 2019-10-08 16:45:21 -07:00
parent f24dbd5e57
commit 2607e5e3ad
1 changed files with 2 additions and 3 deletions

View File

@ -30,9 +30,8 @@
title_link: attachment.url, title_link: attachment.url,
title_link_download: true, title_link_download: true,
image_url: attachment.width ? attachment.url : undefined, image_url: attachment.width ? attachment.url : undefined,
audio_url: [".ogg", ".mp3", ".wav", ".flac"].some(ext=>attachment.filename.endsWith(ext)) ? attachment.url : undefined, audio_url: [".ogg", ".mp3", ".wav", ".flac"].some(ext=>attachment.name.endsWith(ext)) ? attachment.url : undefined,
video_url: [".mp4", ".webm", ".mov", ".avi"].some(ext=>attachment.filename.endsWith(ext)) ? attachment.url : undefined video_url: [".mp4", ".webm", ".mov", ".avi"].some(ext=>attachment.name.endsWith(ext)) ? attachment.url : undefined
})); }));
message.rcmsg = await driver.sendMessage(rcmsg); message.rcmsg = await driver.sendMessage(rcmsg);
}); });