about summary refs log tree commit diff
path: root/app/models/announcement.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-03-08 16:10:48 +0100
committerGitHub <noreply@github.com>2020-03-08 16:10:48 +0100
commitaa67036b41d37935210c8b5094ac20c153a62011 (patch)
tree27afe119c6d80b7100e2e92d73df40fc3db2dc7c /app/models/announcement.rb
parent5e4b6496557b5ef167518dbc6015307158e30ccf (diff)
Add support for links to statuses in announcements to be opened in web UI (#13212)
* Add support for links to public statuses in announcements to be opened in WebUI

* Please CodeClimate
Diffstat (limited to 'app/models/announcement.rb')
-rw-r--r--app/models/announcement.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/announcement.rb b/app/models/announcement.rb
index d99502f44..f8ac4e09d 100644
--- a/app/models/announcement.rb
+++ b/app/models/announcement.rb
@@ -48,6 +48,10 @@ class Announcement < ApplicationRecord
     @mentions ||= Account.from_text(text)
   end
 
+  def statuses
+    @statuses ||= Status.from_text(text)
+  end
+
   def tags
     @tags ||= Tag.find_or_create_by_names(Extractor.extract_hashtags(text))
   end