|
@@ -84,7 +84,7 @@ export class RoomAssistant {
|
|
|
const role = cancel ? "customer" : "assistant";
|
|
|
// assistant是助手,customer是普通角色,操作role会好些
|
|
|
const userObj = Object.assign({}, user, { role: role, order: 1 });
|
|
|
- const roomObj = Object.assign({}, roomConfigRes, { assistantId: cancel ? null : user.userId });
|
|
|
+ const roomObj = Object.assign({}, roomConfigRes, { assistantId: user.userId });
|
|
|
// console.log("setAssistant", userObj, roomObj);
|
|
|
// console.error("roomObj", roomObj);
|
|
|
await updateRoomUser(roomId, userId, userObj);
|
|
@@ -203,7 +203,7 @@ export class RoomAssistant {
|
|
|
this.socket.join(roomId);
|
|
|
const AllRoomUsers = await getAllRoomUsers(roomId);
|
|
|
const roomConfig = await getRoomConfig(roomId);
|
|
|
- this.socket.broadcast.emit(EVENT.roomIn, {
|
|
|
+ this.socket.broadcast.to(roomId).emit(EVENT.roomIn, {
|
|
|
user,
|
|
|
roomsPerson: AllRoomUsers,
|
|
|
roomsConfig: roomConfig,
|