Skip to content

A platform for community discussion. Free, open, simple.

UX: moved posts message links to the first post at the destination topic

Neil Lalonde3e9230714fdd
diff --git a/app/models/post_mover.rb b/app/models/post_mover.rb
index 7544a87ef15..14a41879eca 100644
--- a/app/models/post_mover.rb
+++ b/app/models/post_mover.rb
@@ -182,9 +182,13 @@ class PostMover
move_type_str = PostMover.move_types[@move_type].to_s
message = I18n.with_locale(SiteSetting.default_locale) do
- I18n.t("move_posts.#{move_type_str}_moderator_post",
- count: posts.length,
- topic_link: "[#{destination_topic.title}](#{destination_topic.relative_url})")
+ I18n.t(
+ "move_posts.#{move_type_str}_moderator_post",
+ count: posts.length,
+ topic_link: posts.first.is_first_post? ?
+ "[#{destination_topic.title}](#{destination_topic.relative_url})" :
+ "[#{destination_topic.title}](#{posts.first.url})"
+ )
end
original_topic.add_moderator_post(