|
@@ -81,7 +81,7 @@ export class RoomController extends BasicController {
|
|
if (this.user.role === "leader") {
|
|
if (this.user.role === "leader") {
|
|
order = 0;
|
|
order = 0;
|
|
}
|
|
}
|
|
- if (this.user.role === "customer" && Number(this.issAssistant) === 1) {
|
|
|
|
|
|
+ if (this.user.role === "customer" && Number(this.user.issAssistant) === 1) {
|
|
order = 1;
|
|
order = 1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -244,6 +244,16 @@ export class RoomController extends BasicController {
|
|
console.log("currentUser.role", user.role);
|
|
console.log("currentUser.role", user.role);
|
|
// 如果踢人后 如何通知?
|
|
// 如果踢人后 如何通知?
|
|
this.socket.broadcast.to(roomId).emit(EVENT.beKicked, data);
|
|
this.socket.broadcast.to(roomId).emit(EVENT.beKicked, data);
|
|
|
|
+ // 被踢人是助手
|
|
|
|
+ if (assistantId == data.userId) {
|
|
|
|
+ const roomConfig = await getRoomConfig(roomId);
|
|
|
|
+ if (roomConfig.assistantId) {
|
|
|
|
+ delete roomConfig.assistantId;
|
|
|
|
+ }
|
|
|
|
+ await setRoomConfig(roomId, roomConfig);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const assistantId = await this.roomAssistant.getRoomAssistant(this.roomId);
|
|
|
|
|
|
setTimeout(async () => {
|
|
setTimeout(async () => {
|
|
const isKick = await this.roomAssistant.kickPersion(roomId, userId);
|
|
const isKick = await this.roomAssistant.kickPersion(roomId, userId);
|