about summary refs log tree commit diff
path: root/app/services/activitypub/process_poll_service.rb
AgeCommit message (Collapse)Author
2021-01-10Optimize map { ... }.compact calls (#15513)luigi
* Optimize map { ... }.compact using Enumerable#filter_map, supported since Ruby 2.7 * Add poyfill for Enumerable#filter_map
2019-11-26Fix empty poll options not being filtered on remote poll update (#12484)ThibG
If a poll contains empty options (which is apparently possible on Pleroma), it is created without them. However, the poll update code doesn't filter empty options, and thus: 1. Clear known votes, as it assumes the set of options has changed 2. Errors out because it tries adding empty options, which fails validation This commit fixes that by filtering them out the same way they are filtered out at poll creation time.
2019-09-29Add voters count support (#11917)ThibG
* Add voters count to polls * Add ActivityPub serialization and parsing of voters count * Add support for voters count in WebUI * Move incrementation of voters count out of redis lock * Reword “voters” to “people”
2019-07-09Refactor domain block checks (#11268)Eugen Rochko
2019-03-21Fix processing poll Updates (#10333)ThibG
ActivityPub::ProcessPollService was checking the JSON-LD context although it was passed only the `Question` object embedded in the `Update` activity.
2019-03-11Support pushing and receiving updates to poll tallies (#10209)ThibG
* Process incoming poll tallies update * Send Update on poll vote * Do not send Updates for a poll more often than once every 3 minutes * Include voters in people to notify of results update * Schedule closing poll worker on poll creation * Add new notification type for ending polls * Add front-end support for ended poll notifications * Fix UpdatePollSerializer * Fix Updates not being triggered by local votes * Fix tests failure * Fix web push notifications for closing polls * Minor cleanup * Notify voters of both remote and local polls when those close * Fix delivery of poll updates to mentioned accounts and voters