mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not show recipient user in email participants list (#14642)
This commit removes the recipient's username from the respond to / participants list that is shown at the bottom of user notification emails. For example if the recipient's username was jsmith, and there were participants ljones and bmiller, we currently show this: > "reply to this email to respond to jsmith, ljones, bmiller" or > "Participants: jsmith, ljones, bmiller" However this is a bit redundant, as you are not replying to yourself here if you are the recipient user. So we omit the recipient user's username from this list, which is only used in the text of the email and not elsewhere.
This commit is contained in:
@@ -591,14 +591,14 @@ describe UserNotifications do
|
||||
expect(mail.subject).to include("[PM] ")
|
||||
end
|
||||
|
||||
it "includes a list of participants, groups first with member lists" do
|
||||
it "includes a list of participants (except for the destination user), groups first with member lists" do
|
||||
group1 = Fabricate(:group, name: "group1")
|
||||
group2 = Fabricate(:group, name: "group2")
|
||||
|
||||
user1 = Fabricate(:user, username: "one", groups: [group1, group2])
|
||||
user2 = Fabricate(:user, username: "two", groups: [group1])
|
||||
|
||||
topic.allowed_users = [user1, user2]
|
||||
topic.allowed_users = [user, user1, user2]
|
||||
topic.allowed_groups = [group1, group2]
|
||||
|
||||
mail = UserNotifications.user_private_message(
|
||||
|
||||
Reference in New Issue
Block a user