Initial poll implementation#2113
Draft
BentiGorlich wants to merge 3 commits into
Draft
Conversation
Member
Author
|
Open things:
|
- add the ability to add a poll to Entry, EntryComment, Post and PostComment - Polls: - can be multiple choice - can contain an unlimited number of choices - can expire - Add a hidden form for the poll to all create forms, the form appears when a checkbox is checked - The ActivityPub implementation is the same as on Mastodon: https://docs.joinmastodon.org/spec/activitypub/#Question - Add tests for the ActivityPub implementation and the Api controller - The api had to be shifted a bit -> the `serialize...` functions in the base api take only the entity classes now instead of their dto variant -> touched a lot of api classes because of this
- fix the end date being ignored upon poll creation - make the poll end date DATETIMETZ_IMMUTABLE -> with time zone - implement refreshing the vote counts of remote polls - fix handling of `Update` activities -> only edit the poll (and discarding all votes) when the content actually changed, pass through the correct object to refresh the poll counts - send an `Update` activity when a vote is created on a local poll - fix missing query from `EntryCommentRepository` and `PostCommentRepository` in the `PollVoteFactory` - add a way to invalidate the cache of an activity object - add support for the `closed` property on polls (it is the same as `endTime`) - add a way to just show the results of a poll in the UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
serialize...functions in the base api take only the entity classes now instead of their dto variant -> touched a lot of api classes because of thisI will add images when this moves out of the draft phase :)
Closes #647