Allow upvoting own Q&A questions as an opt-in setting
CI / Deploy / test (push) Successful in 52s
CI / Deploy / deploy (push) Skipped

The new Q&A setting allow_self_upvote (off by default) lets participants
spend their upvote budget on their own questions, e.g. for prioritizing
topics. Without it, participants now see a short hint why their own
questions cannot be upvoted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 20:23:53 +01:00
1 parent ec0b13cae8
commit affc9a5ece
10 files changed
+59 -12

No files matched your search

+1
View File
@@ -173,6 +173,7 @@ class SlidesTable extends Table
case Slide::TYPE_QA:
$max = (int)($input['max_upvotes'] ?? $settings['max_upvotes']);
$settings['max_upvotes'] = max(1, min(Slide::QA_MAX_UPVOTES, $max));
$settings['allow_self_upvote'] = filter_var($input['allow_self_upvote'] ?? false, FILTER_VALIDATE_BOOLEAN);
break;
case Slide::TYPE_YOUTUBE:
$url = mb_substr(trim((string)($input['url'] ?? '')), 0, 500);