Adding CID tags for attachments (#75)

This commit is contained in:
Daniel Homola 2021-08-28 21:54:12 +02:00 committed by GitHub
parent ceb614a2c5
commit 4ef78fc181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ function getFrom(from, username) {
async function getAttachments(attachments) { async function getAttachments(attachments) {
const globber = await glob.create(attachments.split(',').join('\n')) const globber = await glob.create(attachments.split(',').join('\n'))
const files = await globber.glob() const files = await globber.glob()
return files.map(f => ({ path: f })) return files.map(f => ({ path: f, cid: f.replace(/^.*[\\\/]/, '')}))
} }
async function main() { async function main() {