about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-04-10 22:13:15 +0200
committerThibaut Girka <thib@sitedethib.com>2018-04-11 20:40:29 +0200
commit50eb8f1f613df0a2379565f5f5eabd8acc110f15 (patch)
tree008492064435329839a8f29ddf4849e79c80803d /app/models/concerns
parent33c2bbdda7f94789dc0455711093ee788c64a531 (diff)
Add backend support for bookmarks
Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/account_interactions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index fdf35a4e3..3830ba9b0 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -164,6 +164,10 @@ module AccountInteractions
     status.proper.favourites.where(account: self).exists?
   end
 
+  def bookmarked?(status)
+    status.proper.bookmarks.where(account: self).exists?
+  end
+
   def reblogged?(status)
     status.proper.reblogs.where(account: self).exists?
   end