Skip to content

Started work on polls - #12

Merged
Webbanditten merged 15 commits into
masterfrom
feature/polls
May 8, 2026
Merged

Started work on polls#12
Webbanditten merged 15 commits into
masterfrom
feature/polls

Conversation

@Webbanditten

Copy link
Copy Markdown
Owner

No description provided.

List<PollTrigger> actualTriggers = new ArrayList<>();

for (PollTrigger trigger : triggers) {
boolean hasTimeWindow = trigger.getTimeFrom() != 0 && trigger.getTimeTo() != 0;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

or

if(isWithinTimeWindow) {
if((player.getRoomUser() != null && player.getRoomUser().getRoom() != null) && trigger.getRoomId() == player.getRoomUser().getRoom().getId()) {
actualTriggers.add(trigger);
} else if(trigger.getRoomId() == 0) {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

See if it can fit in the other if statement

…nd time-based status

- Add MULTI_CHOICE question type with client type mapping and selection helpers
- Fix POLL_ANSWER handler: user_id tracking, duplicate prevention, bounds checking
- Fix POLL_START/POLL_REJECT: null checks, accept/reject status tracking
- Add POLL_ERROR outgoing composer (packet 318)
- Fix inverted time window logic in Poll.sendAvailablePoll
- Cache questions on Poll object to fix N+1 query
- Update PollDao: INSERT IGNORE for answers, hasUserAnswered, addOffer with status
- Remove hardcoded debug output from POLL_CONTENTS
- Fix polls.sql schema: correct FKs, add user_id/poll_id to answers, varchar(20) type
- Add polls_migration_v2.sql for existing database upgrades
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

Pre-Release Build Ready

Tag Image
SHA ghcr.io/webbanditten/kepler:cbcbab8
PR ghcr.io/webbanditten/kepler:pr-12
docker pull ghcr.io/webbanditten/kepler:cbcbab8

@Webbanditten
Webbanditten merged commit 20465c1 into master May 8, 2026
1 check passed
@Webbanditten
Webbanditten deleted the feature/polls branch May 8, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant