From 50eb8f1f613df0a2379565f5f5eabd8acc110f15 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 10 Apr 2018 22:13:15 +0200 Subject: Add backend support for bookmarks Bookmarks behave like favourites, except they aren't shared with other users and do not have an associated counter. --- app/models/concerns/account_interactions.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/concerns') 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 -- cgit