diff --git a/backend/src/middleware/email/emailMiddleware.js b/backend/src/middleware/email/emailMiddleware.js index 571b733d5..de526dd6e 100644 --- a/backend/src/middleware/email/emailMiddleware.js +++ b/backend/src/middleware/email/emailMiddleware.js @@ -76,5 +76,10 @@ export default { AddEmailAddress: sendEmailVerificationMail, requestPasswordReset: sendPasswordResetMail, Signup: sendSignupMail, + // Wolle + // CreatePost: handleContentDataOfPost, + // UpdatePost: handleContentDataOfPost, + // CreateComment: handleContentDataOfComment, + // UpdateComment: handleContentDataOfComment, }, } diff --git a/backend/src/middleware/notifications/notificationsMiddleware.js b/backend/src/middleware/notifications/notificationsMiddleware.js index c76b9ca0e..60694dc56 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.js +++ b/backend/src/middleware/notifications/notificationsMiddleware.js @@ -6,11 +6,16 @@ const publishNotifications = async (...promises) => { const notifications = await Promise.all(promises) notifications .flat() - .forEach((notificationAdded) => pubsub.publish(NOTIFICATION_ADDED, { notificationAdded })) + .forEach((notificationAdded) => { + pubsub.publish(NOTIFICATION_ADDED, { notificationAdded }) + // Wolle + // XXX send e-mails + }) } const handleContentDataOfPost = async (resolve, root, args, context, resolveInfo) => { const idsOfUsers = extractMentionedUsers(args.content) + // Wolle console.log(context) const post = await resolve(root, args, context, resolveInfo) if (post) { await publishNotifications(