akhoury / nodebb-plugin-emailer-mandrill

An emailer plugin for NodeBB using Mandrill as a third party service
MIT License
3 stars 11 forks source link

Fix recommended Mandrill webhook URL #22

Closed firstred closed 7 years ago

firstred commented 7 years ago

This PR restores the email reply functionality via the Mandrill plugin by exposing two public routes which can be used for Mandrill webhooks.

It also includes node-email-reply-parser to have GitHub-like email content filtering.

firstred commented 7 years ago

The routes as proposed by the plugin on NodeBB 1.4.3 reject Mandrill's webhook calls with either a 401 or 403 response.

On Aug 11, 2017 10:16 PM, "Julian Lam" notifications@github.com wrote:

@julianlam commented on this pull request.

In index.js https://github.com/akhoury/nodebb-plugin-emailer-mandrill/pull/22#discussion_r132775148 :

@@ -267,4 +263,13 @@ Emailer.admin = { } };

+Emailer.addMiddleware = function(data, callback) {

  • data.app.head('/emailer-mandrill/reply', function(req, res) {
  • res.sendStatus(200);
  • });
  • data.app.post('/emailer-mandrill/reply', Emailer.receive);
  • callback(); +};

I don't understand... the two routes as they are don't do anything related to user (well, except for the actual email parsing)... and the logic itself is identical. Unless it wasn't working in static:app.route, there should be no reason to move it out of there...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akhoury/nodebb-plugin-emailer-mandrill/pull/22#discussion_r132775148, or mute the thread https://github.com/notifications/unsubscribe-auth/AGdjuG6_oKW-DgYh7cVYRTfSwb5udE5eks5sXLaRgaJpZM4OynpG .