Here's how to make the Discussion forums send emails for every reply instead of just the first one!

I don’t like how the Open edX discussion forums only send students emails for the first reply. So when I was looking at this fix for a different forum issue, I noticed the following code above it:

def _should_send_message(context):
    cc_thread_author = cc.User(id=context['thread_author_id'], course_id=context['course_id'])
    return (
        _is_user_subscribed_to_thread(cc_thread_author, context['thread_id']) and
        _is_not_subcomment(context['comment_id']) and
        _is_first_comment(context['comment_id'], context['thread_id'])
    )

If you replace that code with this code:

def _should_send_message(context):
    cc_thread_author = cc.User(id=context['thread_author_id'], course_id=context['course_id'])
    return (_is_user_subscribed_to_thread(cc_thread_author, context['thread_id']))

Then the forums will email the student (who’s following their thread) for every reply! (By the instructor or by other students), which is much more appropriate (interrupt-based notification (email), not polling-based (where the student has to keep re-checking to see if anyone replied))

Of course in order to make this change in the Tutor-ized world, you need to fork edx-platform to your own copy in your own public git repository, and then forever more any time you would have run tutor images build openedx instead you need to run

tutor images build openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/your_username/edx-platform.git --build-arg EDX_PLATFORM_VERSION=your_branch_that_has_your_changes

And then tutor local quickstart as normal.
(Also FYI rebuilding images will eventually steal all your disk space, so don’t forget to do docker system prune occasionally)

I would like to officially request that that code I removed be added behind a feature flag, but I’m not sure where to do that anymore?