|
@@ -87,18 +87,17 @@ export class RoomController extends BasicController {
|
|
|
|
|
|
const userObj = { ...this.user, onlineStatus: 1, isConnected: true, order };
|
|
const userObj = { ...this.user, onlineStatus: 1, isConnected: true, order };
|
|
|
|
|
|
-
|
|
|
|
- // const assistantId = await this.roomAssistant.getRoomAssistant(this.roomId);
|
|
|
|
- // if (!this.isHoster(this.user.role)) {
|
|
|
|
- // console.log("assistantId", assistantId);
|
|
|
|
- // console.log("this.userId", this.user.userId);
|
|
|
|
- // this.logger.info("默认变更条件:" + (assistantId && Number(this.user.userId) !== Number(assistantId)));
|
|
|
|
|
|
+ const assistantId = await this.roomAssistant.getRoomAssistant(this.roomId);
|
|
|
|
+ if (!this.isHoster(this.user.role)) {
|
|
|
|
+ console.log("assistantId", assistantId);
|
|
|
|
+ console.log("this.userId", this.user.userId);
|
|
|
|
+ this.logger.info("默认变更条件:" + (assistantId && Number(this.user.userId) !== Number(assistantId)));
|
|
|
|
|
|
- // if (assistantId && Number(this.user.userId) !== Number(assistantId)) {
|
|
|
|
- // this.logger.info("已存在默认助手变更:" + "room助手ID: " + assistantId + " userId: " + this.user.userId);
|
|
|
|
- // userObj.role = "customer";
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ if (assistantId && Number(this.user.userId) !== Number(assistantId)) {
|
|
|
|
+ this.logger.info("已存在默认助手变更:" + "room助手ID: " + assistantId + " userId: " + this.user.userId);
|
|
|
|
+ userObj.isAssistant = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
// if (assistantId && Number(this.userId) !== Number(assistantId) && !this.isHoster(this.user.role)) {
|
|
// if (assistantId && Number(this.userId) !== Number(assistantId) && !this.isHoster(this.user.role)) {
|
|
// userObj.role = "customer";
|
|
// userObj.role = "customer";
|