mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Send invite email and notification in the background
This commit is contained in:
parent
c2e14ded13
commit
a93c939dbc
1 changed files with 3 additions and 1 deletions
|
@ -77,10 +77,12 @@ module.exports = CollaboratorsInviteHandler =
|
||||||
if err?
|
if err?
|
||||||
logger.err {err, projectId, sendingUserId: sendingUser._id, email}, "error saving token"
|
logger.err {err, projectId, sendingUserId: sendingUser._id, email}, "error saving token"
|
||||||
return callback(err)
|
return callback(err)
|
||||||
|
# Send email and notification in background
|
||||||
CollaboratorsInviteHandler._sendMessages projectId, sendingUser, invite, (err) ->
|
CollaboratorsInviteHandler._sendMessages projectId, sendingUser, invite, (err) ->
|
||||||
if err?
|
if err?
|
||||||
logger.err {projectId, email}, "error sending messages for invite"
|
logger.err {projectId, email}, "error sending messages for invite"
|
||||||
callback(err, invite)
|
callback(null, invite)
|
||||||
|
|
||||||
|
|
||||||
revokeInvite: (projectId, inviteId, callback=(err)->) ->
|
revokeInvite: (projectId, inviteId, callback=(err)->) ->
|
||||||
logger.log {projectId, inviteId}, "removing invite"
|
logger.log {projectId, inviteId}, "removing invite"
|
||||||
|
|
Loading…
Reference in a new issue