mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FIX: correctly uses private_email site setting in chat (#24528)
Chat will now check for the state of `SiteSetting.private_email` when sending the summary, when enabled, the mail will not display user information, channel information other than the ID and no message information, only the count of messages.
This commit is contained in:
@ -53,6 +53,15 @@ module Chat
|
||||
end
|
||||
|
||||
def summary_subject(user, grouped_messages)
|
||||
if SiteSetting.private_email
|
||||
return(
|
||||
I18n.t(
|
||||
"user_notifications.chat_summary.subject.private_message",
|
||||
email_prefix: @email_prefix,
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
all_channels = grouped_messages.keys
|
||||
grouped_channels = all_channels.partition { |c| !c.direct_message_channel? }
|
||||
channels = grouped_channels.first
|
||||
|
Reference in New Issue
Block a user