FIX: don't send mailing list for post with empty content (PR #10577)

discourse-assign is creating posts with empty content to show that a user was assign/unassigned for a topic.

It is causing confusing emails with empty content.

The bug was mentioned here: https://meta.discourse.org/t/again-on-empty-emails-and-notifications-generated-on-topic-assignment/162213

GitHub

discourse-assign is creating posts with empty content to show that a user was assign/unassigned for a topic.

Isn’t this plugin creating either a small_action or whisper post? Maybe we should not send small_action posts when using the mailing list?

@ZogStriP you are right, this is small_action or whisper depending on if assignments can be public

post_type = SiteSetting.assigns_public ? Post.types[:small_action] : Post.types[:whisper]

and on Discourse itself, we skip small actions

def skip_after_create?
  @opts[:import_mode] ||
    @topic.private_message? ||
    @post.post_type == Post.types[:moderator_action] ||
    @post.post_type == Post.types[:small_action]
end

However, I was thinking that whispers may be important and moderators would like to be informed about them - as long as they have some content inside

However, I was thinking that whispers may be important and moderators would like to be informed about them - as long as they have some content inside

:+1:

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/again-on-empty-emails-and-notifications-generated-on-topic-assignment/162213/13