try to fix this spaghetti of a code

This commit is contained in:
Frederik Spirgi
2026-09-09 11:02:31 +02:00
parent c0eb11c8d4
commit 45eef9ef5c
4 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ function createLobbyService(repository, config) {
const membershipMutation = ['lobby:create', 'lobby:join', 'lobby:leave'].includes(message.type);
return queue.run([...(membershipMutation ? ['membership'] : []), ...(username ? [`account:${username}`] : []),
...(message.lobbyId ? [`lobby:${message.lobbyId}`] : [])], async () => {
const id = `${username || 'system'}:${message.requestId}`;
const id = `${username ? `user:${username}` : 'system'}:${message.requestId}`;
const fingerprint = hash(JSON.stringify(canonical(message)));
const prior = await repository.command(id);
if (prior) {