Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parse post content before sending notification #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cryptoethic
Copy link

Resolves issue I have created on NodeBB repo: NodeBB/NodeBB#8358

Parse post content before sending notification

@julianlam
Copy link
Owner

This would cause issues in the notifications themselves (in NodeBB), as they're not meant to take raw html.

There might be a different hook you can use for markdown parsing for emails only ..

@cryptoethic
Copy link
Author

Okay. What about SocketHelpers.sendNotificationToPostOwner from core src/socket.io/helpers.js

It is from where I took inspiration

@cryptoethic
Copy link
Author

I believe it can be attached to filter:email.params (checking if type of notification type is mention and then replacing body with post.parsePost)

But what about other notifications types that parse post content before firing. I haven't noticed them working incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants