Przeglądaj źródła

测试助手条件

gemercheung 3 lat temu
rodzic
commit
073a3342f9
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/controller/room/index.js

+ 2 - 2
src/controller/room/index.js

@@ -92,8 +92,8 @@ export class RoomController extends BasicController {
       const userObj = { ...this.user, onlineStatus: 1, isConnected: true, order };
       const assistantId = await this.roomAssistant.getRoomAssistant(this.roomId);
 
-      if (assistantId && this.userId !== assistantId && !this.isHoster(this.user.role)) {
-        this.logger.info("已存在默认助手变更:" + "room助手ID:" + assistantId + "userId: " + this.userId);
+      if (assistantId && Number(this.userId) !== Number(assistantId) && !this.isHoster(this.user.role)) {
+        this.logger.info("已存在默认助手变更:" + "room助手ID: " + assistantId + "userId: " + this.userId);
         userObj.role = "customer";
       }
       this.logger.info("update-user-info:", userObj);