Add matchmaking state to user/self - #1506
Conversation
geekingfrog
left a comment
There was a problem hiding this comment.
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
…atchmaking-state # Conflicts: # lib/teiserver/player/types/mm_pairing_state.ex
|
I'll let you fix the merge conflicts, and then I'll address #1517 afterward. |
|
Merge conflicts? I think those were resolved with the last set of changes I had made |
|
hum, somehow github cannot rebase and merge, but is fine with creating a merge commit or squashing. |
|
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 |
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.