Add UserRegistry to store all existing users and UserCleanupJob to periodicly remove expired user #189

Merged
lars.winzer merged 12 commits from feat/user-serverside into main 2026-03-15 20:00:59 +01:00
Showing only changes of commit 9d9b6ae2c7 - Show all commits
@@ -39,4 +39,14 @@ public class UserRegistry {
}
return Optional.empty();
}
// TODO: Add to EventRegistry with DisconnectEvent
public synchronized void onDisconnect(SessionId sessionId) {
Optional<User> user = findBySessionId(sessionId);
if (user.isPresent()) {
user.get().markDisconnected();
}
}
}