+ hideNotificationPreferencesLink: true
+ }
+ }
+
+ return JobQueue.Instance.createJobAsync({ type: 'email', payload: emailPayload })
+ }
+
+ addUserRegistrationRequestProcessedJob (registration: MRegistration) {
+ let template: string
+ let subject: string
+ if (registration.state === UserRegistrationState.ACCEPTED) {
+ template = 'user-registration-request-accepted'
+ subject = `Your registration request for ${registration.username} has been accepted`
+ } else {
+ template = 'user-registration-request-rejected'
+ subject = `Your registration request for ${registration.username} has been rejected`
+ }
+
+ const to = registration.email
+ const emailPayload: EmailPayload = {
+ to: [ to ],
+ template,
+ subject,
+ locals: {
+ username: registration.username,
+ moderationResponse: registration.moderationResponse,
+ loginLink: WEBSERVER.URL + '/login'