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

This commit is contained in:
Roman Rizzi 2020-03-26 09:07:41 -03:00 committed by GitHub
parent e62071830d
commit 6bceb1d15a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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