Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
This commit is contained in:
2
backend/services/chatService.js
Normal file → Executable file
2
backend/services/chatService.js
Normal file → Executable file
@@ -4,6 +4,7 @@ import User from '../models/community/user.js';
|
||||
import Room from '../models/chat/room.js';
|
||||
import UserParam from '../models/community/user_param.js';
|
||||
import UserParamType from '../models/type/user_param.js';
|
||||
import { dispatchRealtimeEvent } from './pushNotificationService.js';
|
||||
|
||||
const RABBITMQ_URL = process.env.AMQP_URL || 'amqp://localhost';
|
||||
const QUEUE = 'oneToOne_messages';
|
||||
@@ -257,6 +258,7 @@ class ChatService {
|
||||
this.amqpAvailable = false;
|
||||
}
|
||||
}
|
||||
await dispatchRealtimeEvent(user2HashId, 'chatMessage', { sender: user1HashId });
|
||||
}
|
||||
|
||||
async getOneToOneMessageHistory(user1HashId, user2HashId) {
|
||||
|
||||
Reference in New Issue
Block a user