Skip to content

Add matchmaking state to user/self - #1506

Merged
geekingfrog merged 5 commits into
beyond-all-reason:mainfrom
burnhamrobertp:feature/user-self-matchmaking-state
Sep 4, 2026
Merged

Add matchmaking state to user/self#1506
geekingfrog merged 5 commits into
beyond-all-reason:mainfrom
burnhamrobertp:feature/user-self-matchmaking-state

Conversation

@burnhamrobertp

@burnhamrobertp burnhamrobertp commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Adds the player's matchmaking state to the user/self event. Fixes #1450

The role_updated path is in here because it is the other emitter of user/self and it was raising a KeyError: it gets handed the connection state, which has never carried party or battle. Leaving it would mean the new field only ever reaches a client on login and reconnect.

Verified against a local server with two tachyon clients and the bar-lobby client from beyond-all-reason/bar-lobby#711, covering reconnects while queuing, paired, paired after readying up, and queued in two queues at once.

AI disclosure: written with assistance from Claude Code.

@burnhamrobertp
burnhamrobertp marked this pull request as ready for review August 27, 2026 20:26

@geekingfrog geekingfrog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

side note: I think it would have been better to split the commits a bit.
The introduction of a named type queue_ref is good, but completely unrelated to anything else, and could have been in its own commit. It makes reviewing easier.

similarly for the modification to the role updated path.

just the small datetime.shift thingy and it should be good to go

Comment thread lib/teiserver/player/session.ex Outdated
Comment thread lib/teiserver/player/session.ex
Comment thread lib/teiserver/player/session.ex Outdated
@geekingfrog

Copy link
Copy Markdown
Collaborator

I'll let you fix the merge conflicts, and then I'll address #1517 afterward.

@burnhamrobertp

Copy link
Copy Markdown
Contributor Author

Merge conflicts? I think those were resolved with the last set of changes I had made

@geekingfrog
geekingfrog merged commit 63be093 into beyond-all-reason:main Sep 4, 2026
3 checks passed
@geekingfrog

Copy link
Copy Markdown
Collaborator

hum, somehow github cannot rebase and merge, but is fine with creating a merge commit or squashing.

@burnhamrobertp
burnhamrobertp deleted the feature/user-self-matchmaking-state branch September 4, 2026 14:28
@burnhamrobertp

Copy link
Copy Markdown
Contributor Author

Ah if that's what you had meant, I could've done that, certainly. Just let me know if you refer that pattern for teiserver specifically, and I can at least try to remember to adhere to it

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.

add matchmaking state to user/self event

2 participants