Fix #4540: Demotion sends "You have been promoted" dmail.
Change message to "Your account has been updated". It's possible for a user to both gain and lose permissions at the same time, so just say their account has been updated to make it easier.
This commit is contained in:
@@ -88,11 +88,7 @@ class UserPromotion
|
||||
end
|
||||
|
||||
def create_dmail
|
||||
Dmail.create_automated(
|
||||
:to_id => user.id,
|
||||
:title => "You have been promoted",
|
||||
:body => build_messages
|
||||
)
|
||||
Dmail.create_automated(to_id: user.id, title: "Your account has been updated", body: build_messages)
|
||||
end
|
||||
|
||||
def create_user_feedback
|
||||
|
||||
@@ -34,7 +34,7 @@ class UserTest < ActiveSupport::TestCase
|
||||
@user.promote_to!(User::Levels::GOLD)
|
||||
end
|
||||
|
||||
assert(@user.dmails.exists?(from: bot, to: @user, title: "You have been promoted"))
|
||||
assert(@user.dmails.exists?(from: bot, to: @user, title: "Your account has been updated"))
|
||||
refute(@user.dmails.exists?(from: bot, to: @user, title: "Your user record has been updated"))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user