feat: Implement real-time messaging module with REST API endpoints and WebSocket gateway.

This commit is contained in:
pradeepkumar
2026-02-08 22:44:16 +05:30
parent 895a106d1b
commit 3b1a7b999e
14 changed files with 1274 additions and 34 deletions

View File

@@ -14,6 +14,11 @@ export class JwtAuthGuard extends AuthGuard('jwt') {
}
canActivate(context: ExecutionContext) {
// Skip WebSocket connections - they have their own auth in the gateway
if (context.getType() === 'ws') {
return true;
}
// Check if route is marked as public
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
context.getHandler(),

View File

@@ -13,6 +13,11 @@ export class RolesGuard implements CanActivate {
constructor(private reflector: Reflector) {}
canActivate(context: ExecutionContext): boolean {
// Skip WebSocket connections - they have their own auth in the gateway
if (context.getType() === 'ws') {
return true;
}
const requiredRoles = this.reflector.getAllAndOverride<UserRole[]>(
ROLES_KEY,
[context.getHandler(), context.getClass()],