Skip to content

Commit

Permalink
fix: blurchange update
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeahxx19 committed Dec 12, 2023
1 parent e3d8ada commit eb18485
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/chat/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ export class ChatService {
userId: otherUser.userId,
});

//const blurChange = await this.updateBlurStep(room, otherUserIndex);
const blurChange = 2;
const blurChange = await this.updateBlurStep(room, otherUserIndex);

const chats = await this.chattingModel
.find()
.where('roomId')
Expand Down Expand Up @@ -292,9 +292,8 @@ export class ChatService {
}

async updateBlurStep(room: Room, index: number) {
const chatCount = await this.chattingModel
.find({ roomId: room.id })
.countDocuments();
const chatCount = await this.chattingModel.count({ roomId: room.id });
console.log(chatCount);
let blurChange = true;

switch (room.users[index].blur) {
Expand Down

0 comments on commit eb18485

Please sign in to comment.