diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-25 18:28:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 18:28:27 +0200 |
commit | a481af15a9b2a7829c2a849906aa4b475ccdbd98 (patch) | |
tree | 2316623ed73758bd1d61477d94aee3492744933c /app/chewy | |
parent | bb12af7250c9368905bae7d91c6ff0b06f3aa400 (diff) | |
parent | 002d2729fb342ec899d4322bbd64331da7d22a03 (diff) |
Merge pull request #1750 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/chewy')
-rw-r--r-- | app/chewy/statuses_index.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/chewy/statuses_index.rb b/app/chewy/statuses_index.rb index 1381a96ed..1304aeedb 100644 --- a/app/chewy/statuses_index.rb +++ b/app/chewy/statuses_index.rb @@ -55,6 +55,11 @@ class StatusesIndex < Chewy::Index data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) } end + crutch :votes do |collection| + data = ::PollVote.joins(:poll).where(poll: { status_id: collection.map(&:id) }).where(account: Account.local).pluck(:status_id, :account_id) + data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) } + end + root date_detection: false do field :id, type: 'long' field :account_id, type: 'long' |