mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
the note in a FWed email should be a whisper only in PM and when the author is member of the group
This commit is contained in:
@ -420,11 +420,14 @@ module Email
|
||||
end
|
||||
|
||||
if post && post.topic && @before_embedded.present?
|
||||
post_type = Post.types[:regular]
|
||||
post_type = Post.types[:whisper] if post.topic.private_message? && group.usernames[user.username]
|
||||
|
||||
create_reply(user: user,
|
||||
raw: @before_embedded,
|
||||
post: post,
|
||||
topic: post.topic,
|
||||
post_type: Post.types[:whisper])
|
||||
post_type: post_type)
|
||||
end
|
||||
|
||||
true
|
||||
|
Reference in New Issue
Block a user