Talk: Send user an email notifying them when their comment is rejected

Created on 24 Oct 2018  路  9Comments  路  Source: coralproject/talk

Idea from nu.nl:

  • Send an email notification to a user when their comment is rejected
  • Email subject: "Your comment on $organization_name has been removed"
  • Email body: "A recent comment of yours has been removed for violating our community guidelines. Please review our rules before submitting another comment."
  • Needs to include translation support
feature idea good first issue hacktoberfest help wanted

All 9 comments

@kgardnr - I'd like to work on this, any hints on where the change is required?

Awesome @madsalama we'd love to have you contribute this! Take a look at the code, it should be straightforward - let us know if you have any questions and we'd be happy to help!

@kgardnr - I've started the server side and it went smoothly (really great documentation!) - nonetheless I'm confused as to how to test it with a client? Like a demo page where a user posts comments?

@kgardnr - nevermind. I figured out you guys have also created that "demo" integration. I'm amazed by how well-documented everything is! 馃挴

* Needs to include translation support

@kgardnr - I have a question, where is the user's default language stored in user's profile? I need to know that in order to send the user the message in their language. I suppose this also needs to be adapted in all *.yml localization files in all supported languages.

@kgardnr - Any suggestions please? 馃槃

Hey @madsalama! First off - thank you SO MUCH for your kind words about our documentation - we love hearing that it's helpful! We have spent a lot of time on it and appreciate it 鉂わ笍

Re: translating emails, good question - best idea is to see how we handle sending emails and translating them - here is a good example in our notifications plugin: https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-notifications/server

DEFAULT_LANG is the setting that will change the site's language for sending emails, etc - https://github.com/coralproject/talk/blob/8c2c632f52960fb7facee088f5b87a45dd25efc0/config.js#L35

We don't have this configurable per user, as most sites publish in only one language, and all their user communication will also be in this language.

Let me know if this helps, I'm happy to answer more questions for you!

I've implemented this functionality as a plugin. You can check the code here: https://github.com/lytvynenko/talk-plugin-notifications-category-rejected.

Thank you @lytvynenko! I think this living as a plugin makes more sense than adding it to core. Thank you also for you work @madsalama!

Was this page helpful?
0 / 5 - 0 ratings