FIX: custom flags not possible on very long topic titles

This commit is contained in:
Régis Hanol
2014-12-11 19:34:52 +01:00
parent e6e7948617
commit 1353557575
2 changed files with 8 additions and 0 deletions

View File

@@ -174,6 +174,8 @@ class PostAction < ActiveRecord::Base
title = I18n.t("post_action_types.#{post_action_type}.email_title", title: post.topic.title)
body = I18n.t("post_action_types.#{post_action_type}.email_body", message: opts[:message], link: "#{Discourse.base_url}#{post.url}")
title = title.truncate(255, separator: /\s/)
opts = {
archetype: Archetype.private_message,
title: title,