mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
fix: share only emails email_confirmed recipients
This commit is contained in:
parent
63efee390a
commit
2336a62b4f
@ -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' };
|
||||
|
Loading…
Reference in New Issue
Block a user