Browse Source

隐藏去重

gemercheung 3 years ago
parent
commit
3591e49400
1 changed files with 13 additions and 13 deletions
  1. 13 13
      src/controller/room/assistant.js

+ 13 - 13
src/controller/room/assistant.js

@@ -276,19 +276,19 @@ export class RoomAssistant {
    */
   async startCall(roomId, userId, user) {
     try {
-      if (user.oid) {
-        const hasDuplicateUser = await this.getOpenidInRoom(this.roomId, user.oid);
-        console.log("hasDuplicateUser-1", typeof hasDuplicateUser);
-        if (hasDuplicateUser && hasDuplicateUser.length > 0) {
-          this.logger.info("hasDuplicateUser-2", hasDuplicateUser);
-          const removeAll = [];
-          Array.from(hasDuplicateUser).forEach((duplicateUser) => {
-            removeAll.push(removeRoomUser(this.roomId, duplicateUser.userId));
-          });
-          const res = await Promise.all(removeAll);
-          console.log("去重完成", res);
-        }
-      }
+      // if (user.oid) {
+      //   const hasDuplicateUser = await this.getOpenidInRoom(this.roomId, user.oid);
+      //   console.log("hasDuplicateUser-1", typeof hasDuplicateUser);
+      //   if (hasDuplicateUser && hasDuplicateUser.length > 0) {
+      //     this.logger.info("hasDuplicateUser-2", hasDuplicateUser);
+      //     const removeAll = [];
+      //     Array.from(hasDuplicateUser).forEach((duplicateUser) => {
+      //       removeAll.push(removeRoomUser(this.roomId, duplicateUser.userId));
+      //     });
+      //     const res = await Promise.all(removeAll);
+      //     console.log("去重完成", res);
+      //   }
+      // }
 
       if (!this.room.isHoster(user.role)) {
         this.room.logger.info("不是房主", JSON.stringify(user));