mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-15 03:02:17 -05:00
database admin yay
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user