Skip to content

fix: parse post content before sending notification#124

Open
cryptoethic wants to merge 2 commits intojulianlam:masterfrom
cryptoethic:master
Open

fix: parse post content before sending notification#124
cryptoethic wants to merge 2 commits intojulianlam:masterfrom
cryptoethic:master

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