]> cat aescling's git repositories - mastodon.git/commit
Support pushing and receiving updates to poll tallies (#10209)
authorThibG <thib@sitedethib.com>
Sun, 10 Mar 2019 23:49:31 +0000 (00:49 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 10 Mar 2019 23:49:31 +0000 (00:49 +0100)
commit3a92885a860df12b12d8356faf179a3fc63be6f2
treef83e764e7b6f9f4cb84724b09fe0ee9f3ed469f6
parentc11dff50493ecb106390153866bea539f3587293
Support pushing and receiving updates to poll tallies (#10209)

* 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
17 files changed:
app/javascript/mastodon/actions/notifications.js
app/javascript/mastodon/features/notifications/components/notification.js
app/javascript/mastodon/locales/en.json
app/javascript/mastodon/reducers/settings.js
app/javascript/mastodon/service_worker/web_push_locales.js
app/lib/activitypub/activity/create.rb
app/lib/activitypub/activity/update.rb
app/models/notification.rb
app/serializers/activitypub/update_poll_serializer.rb [new file with mode: 0644]
app/serializers/rest/notification_serializer.rb
app/services/activitypub/fetch_remote_poll_service.rb
app/services/activitypub/process_poll_service.rb [new file with mode: 0644]
app/services/notify_service.rb
app/services/post_status_service.rb
app/services/vote_service.rb
app/workers/activitypub/distribute_poll_update_worker.rb [new file with mode: 0644]
app/workers/poll_expiration_notify_worker.rb [new file with mode: 0644]