refactor: migrate to ES modules
package.json type=module, tsconfig module/moduleResolution=NodeNext, target es2022, explicit .js on all relative imports. Center: jsonwebtoken & bcryptjs switched to default imports (ESM/CJS interop). Verified: builds, boots, full auth + plugin round-trip work under ESM. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
} from '@nestjs/websockets';
|
||||
import { Logger } from '@nestjs/common';
|
||||
import { Server, Socket } from 'socket.io';
|
||||
import { introspectGuildToken } from '../common/center-auth';
|
||||
import { introspectGuildToken } from '../common/center-auth.js';
|
||||
|
||||
type XType = 'general' | 'work' | 'report' | 'discuss' | 'triage' | 'custom';
|
||||
|
||||
@@ -189,7 +189,7 @@ export class RealtimeGateway implements OnGatewayConnection, OnGatewayDisconnect
|
||||
wakeUserIds: ctx.wakeUserIds,
|
||||
mentionUserIds: ctx.mentionUserIds,
|
||||
});
|
||||
s.emit('message.created', { ...data, wakeup });
|
||||
s.emit('message.created', { ...data, channelId, wakeup });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ export class RealtimeGateway implements OnGatewayConnection, OnGatewayDisconnect
|
||||
for (const s of sockets) {
|
||||
const recipientUserId = typeof s.data.userId === 'string' ? s.data.userId : `anon:${s.id}`;
|
||||
const wakeup = wakeupUserId !== null && recipientUserId === wakeupUserId;
|
||||
s.emit('message.created', { ...data, wakeup });
|
||||
s.emit('message.created', { ...data, channelId, wakeup });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user