Skip to content

Commit

Permalink
Make bookmarks also searchable (mastodon#13271)
Browse files Browse the repository at this point in the history
  • Loading branch information
tribela authored Mar 21, 2020
1 parent 8758221 commit 8c42e0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ def searchable_by(preloaded = nil)
ids += mentions.where(account: Account.local).pluck(:account_id)
ids += favourites.where(account: Account.local).pluck(:account_id)
ids += reblogs.where(account: Account.local).pluck(:account_id)
ids += bookmarks.where(account: Account.local).pluck(:account_id)
else
ids += preloaded.mentions[id] || []
ids += preloaded.favourites[id] || []
ids += preloaded.reblogs[id] || []
ids += preloaded.bookmarks[id] || []
end

ids.uniq
Expand Down

0 comments on commit 8c42e0b

Please sign in to comment.