FIX: Display small post actions when embedding a topic (#9278)

FIX: Display small post actions when embedding a topic (#9278)

diff --git a/app/helpers/embed_helper.rb b/app/helpers/embed_helper.rb
index 9db2fa5..42e728d 100644
--- a/app/helpers/embed_helper.rb
+++ b/app/helpers/embed_helper.rb
@@ -17,6 +17,9 @@ module EmbedHelper
   end
 
   def get_html(post)
-    raw PrettyText.format_for_email(post.cooked, post)
+    key = "js.action_codes.#{post.action_code}"
+    cooked = post.cooked.blank? ? I18n.t(key, when: nil).humanize : post.cooked
+
+    raw PrettyText.format_for_email(cooked, post)
   end
 end

GitHub sha: 6bceb1d1

This commit appears in #9278 which was approved by eviltrout. It was merged by romanrizzi.