Skip to content

Commit

Permalink
fix: share only emails email_confirmed recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Dec 17, 2024
1 parent 63efee3 commit 2336a62
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/backend/src/structured/sequence/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,16 @@ module.exports = new Sequence([
// Working on notifications
// Email should have a link to a shared file, right?
// .. how do I make those URLs? (gui feature)
await svc_email.send_email({
email: recipient_item.user.email,
}, 'share_by_username', {
// link: // TODO: create a link to the shared file
susername: actor.type.user.username,
rusername: username,
message: metadata.message,
});
if ( recipient_item.user.email && recipient_item.user.email_confirmed ) {
await svc_email.send_email({
email: recipient_item.user.email,
}, 'share_by_username', {
// link: // TODO: create a link to the shared file
susername: actor.type.user.username,
rusername: username,
message: metadata.message,
});
}

result.recipients[recipient_item.i] =
{ $: 'api:status-report', status: 'success' };
Expand Down

0 comments on commit 2336a62

Please sign in to comment.