Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(polls): allow editing of draft polls #13883

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Nov 27, 2024

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • Add capability

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@miaulalala
Copy link
Contributor Author

@nickvergessen wdyt of adding the validation to the setters in the Poll Entity instead of validating them beforehand? Would make sense, don't you think?

@nickvergessen nickvergessen added 2. developing feature: api 🛠️ OCS API for conversations, chats and participants feature: polls 📊 labels Nov 28, 2024
@nickvergessen nickvergessen added this to the 🖤 Next Major (31) milestone Nov 28, 2024
@miaulalala miaulalala force-pushed the feat/edit-delete-poll-drafts branch from 8e473b0 to 9dcf018 Compare December 2, 2024 12:00
@miaulalala miaulalala marked this pull request as ready for review December 5, 2024 14:19
docs/poll.md Outdated Show resolved Hide resolved
@@ -166,6 +166,7 @@
* `config => call => start-without-media` (local) - Boolean, whether media should be disabled when starting or joining a conversation
* `config => call => max-duration` - Integer, maximum call duration in seconds. Please note that this should only be used with system cron and with a reasonable high value, due to the expended duration until the background job ran.
* `config => call => blur-virtual-background` (local) - Boolean, whether blur background is set by default when joining a conversation
+ `edit-draft-poll` - Whether moderators can edit draft polls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to 21? Or are we backport this? Not sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can backport if you like? It's up to you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never backport here (unless forced, and I see no one forcing here) 🙊

Copy link
Member

@nickvergessen nickvergessen Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should move to 21

docs/poll.md Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
@miaulalala miaulalala force-pushed the feat/edit-delete-poll-drafts branch from 2aeb3ef to 0ca00dd Compare December 9, 2024 11:41
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor things and reaching the end soon :)

lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Controller/PollController.php Outdated Show resolved Hide resolved
lib/Service/PollService.php Outdated Show resolved Hide resolved
@miaulalala miaulalala force-pushed the feat/edit-delete-poll-drafts branch 2 times, most recently from f694f53 to 06e4b31 Compare January 16, 2025 13:09
Signed-off-by: Anna Larch <[email protected]>

# The commit message #2 will be skipped:

# fixup! feat(polls): allow editing of draft polls
@miaulalala miaulalala force-pushed the feat/edit-delete-poll-drafts branch from 4787574 to 03c2260 Compare January 16, 2025 17:49
* @see \OCA\Talk\Controller\PollController::createPoll()
*/
public function updateDraftPoll(int $pollId, Room $room, Participant $participant, string $question, array $options, int $resultMode, int $maxVotes): DataResponse {
$proxy = $this->proxy->post(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this will not be part of 20.1 nor 19,
we need to check remote capabilities or add error handling here which does it the old way?
But since drafts are only moderator thing and we don't have federated moderators yet, it's actually never applicable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review feature: api 🛠️ OCS API for conversations, chats and participants feature: polls 📊
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polls - Add option to edit a draft or delete a previous draft when editing (on API level)
2 participants