diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 86a5b40..1af4e65 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -18,7 +18,7 @@ en: already_claimed: "That topic has already been claimed." flag_assigned: "Sorry, that flag's topic is assigned to another user" flag_unclaimed: "You must claim that topic before acting on the flag" - topic_assigned_excerpt: "@%{username} assigned you the topic '%{title}'" + topic_assigned_excerpt: "assigned you the topic '%{title}'" assign_mailer: title: "Assign Mailer" subject_template: "[%{email_prefix}] %{assignee_name} assigned you to '%{topic_title}'!" diff --git a/lib/topic_assigner.rb b/lib/topic_assigner.rb index fb88e0a..1513fd3 100644 --- a/lib/topic_assigner.rb +++ b/lib/topic_assigner.rb @@ -215,8 +215,9 @@ SQL alerter.create_notification_alert( user: assign_to, post: first_post, + username: @assigned_by.username, notification_type: Notification.types[:custom], - excerpt: I18n.t("discourse_assign.topic_assigned_excerpt", title: @topic.title, username: @assigned_by.username) + excerpt: I18n.t("discourse_assign.topic_assigned_excerpt", title: @topic.title) ) end diff --git a/spec/lib/topic_assigner_spec.rb b/spec/lib/topic_assigner_spec.rb index 6a522a7..c32341e 100644 --- a/spec/lib/topic_assigner_spec.rb +++ b/spec/lib/topic_assigner_spec.rb @@ -38,7 +38,7 @@ RSpec.describe TopicAssigner do end expect(messages.length).to eq(1) - expect(messages.first.data[:excerpt]).to eq("@#{moderator2.username} assigned you the topic '#{topic.title}'") + expect(messages.first.data[:excerpt]).to eq("assigned you the topic '#{topic.title}'") expect(TopicQuery.new( moderator, assigned: moderator.username