database admin yay

This commit is contained in:
legop3
2026-06-28 20:17:58 -04:00
parent 5fca14bef5
commit 78fc891cb9
16 changed files with 851 additions and 21 deletions
@@ -9,6 +9,7 @@ const { publishEvent } = require('../eventBus');
const { getNickname, setNickname } = require('../nicknameService');
const { getRole, roleEvents } = require('../roleService');
const {
identityEvents,
getDb,
identifySocket: identifyCanonicalSocket,
getUserById,
@@ -513,6 +514,12 @@ roleEvents.on('change', ({ socket }) => {
}
});
identityEvents.on('change', ({ userId, reason } = {}) => {
if (!userId) return;
refreshSocketsForUser(userId);
emitChange('identity_change', { userId, reason });
});
setInterval(() => {
const now = Date.now();
io.sockets.sockets.forEach((socket) => {