about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-03 23:45:48 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-04 00:00:48 +0100
commit6b81d100306259cd17b38d3f0f9dec0f0fb5b5d9 (patch)
treea6d40da1644804061eaeacdfd748d027aac2c41b /app/lib/formatter.rb
parentf5457cc3d2be79525d339dd5a5c046de6d0acf9d (diff)
Add digest e-mails
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index e353c3504..b58952ae0 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -29,6 +29,11 @@ class Formatter
     sanitize(html, tags: %w(a br p span), attributes: %w(href rel class))
   end
 
+  def plaintext(status)
+    return status.text if status.local?
+    strip_tags(status.text)
+  end
+
   def simplified_format(account)
     return reformat(account.note) unless account.local?