Skip to content

Commit

Permalink
Adding CID tags for attachments (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhomola authored Aug 28, 2021
1 parent ceb614a commit 4ef78fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function getFrom(from, username) {
async function getAttachments(attachments) {
const globber = await glob.create(attachments.split(',').join('\n'))
const files = await globber.glob()
return files.map(f => ({ path: f }))
return files.map(f => ({ path: f, cid: f.replace(/^.*[\\\/]/, '')}))
}

async function main() {
Expand Down

0 comments on commit 4ef78fc

Please sign in to comment.