strip mention html for services
This commit is contained in:
parent
c173bf5104
commit
dc08efacf9
2 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ class Service < ActiveRecord::Base
|
||||||
def public_message(post, length, url = "")
|
def public_message(post, length, url = "")
|
||||||
url = "" if post.respond_to?(:photos) && post.photos.count == 0
|
url = "" if post.respond_to?(:photos) && post.photos.count == 0
|
||||||
space_for_url = url.blank? ? 0 : (url.length + 1)
|
space_for_url = url.blank? ? 0 : (url.length + 1)
|
||||||
truncated = truncate(post.message, :length => (length - space_for_url))
|
truncated = truncate(post.message(:plain_text => true), :length => (length - space_for_url))
|
||||||
truncated = "#{truncated} #{url}" unless url.blank?
|
truncated = "#{truncated} #{url}" unless url.blank?
|
||||||
return truncated
|
return truncated
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ class StatusMessage < Post
|
||||||
get_youtube_title message
|
get_youtube_title message
|
||||||
end
|
end
|
||||||
|
|
||||||
def message
|
def message(opts = {})
|
||||||
self.formatted_message
|
self.formatted_message(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
def raw_message
|
def raw_message
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue