Skip to content

Commit

Permalink
Add notification when user team invite is created
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Jul 16, 2024
1 parent a82a1fa commit e275e9e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions forge/routes/api/teamInvitations.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@ module.exports = async function (app) {
}
)
}
await app.notifications.send(invite.invitee, 'team-invite', {
invite: {
id: invite.hashid
},
team: {
id: request.team.hashid,
name: request.team.name
},
invitor: {
username: request.session.User.username
},
role
})
await app.auditLog.Team.team.user.invited(request.session.User, null, request.team, invite.invitee, role)
}
} catch (err) {
Expand Down

0 comments on commit e275e9e

Please sign in to comment.