Skip to content

Commit

Permalink
remove error
Browse files Browse the repository at this point in the history
  • Loading branch information
overthestream committed Aug 27, 2024
1 parent 072bf93 commit c42bb62
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/domain/blurting/blurting.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,11 @@ export class BlurtingService {
const sexOrient = this.userService.getUserSexOrient(user.userInfo);
//const region = user.userInfo.region.split(' ')[0];
const qName = `${sexOrient}_beta`;
const groupQueue: number[] = await this.cacheManager.get(qName);

let groupQueue: number[] = await this.cacheManager.get(qName);
if (!groupQueue) {
await this.cacheManager.set(qName, []);
groupQueue = [];
}
if (groupQueue.length < 2) {
groupQueue.push(id);
await this.cacheManager.set(qName, groupQueue);
Expand Down Expand Up @@ -287,7 +290,11 @@ export class BlurtingService {
//const region = user.userInfo.region.split(' ')[0];
const qName = `${sexOrient}_beta`;

const groupQueue: number[] = await this.cacheManager.get(qName);
let groupQueue: number[] = await this.cacheManager.get(qName);
if (!groupQueue) {
await this.cacheManager.set(qName, []);
groupQueue = [];
}
if (groupQueue.includes(id)) {
return State.Matching;
}
Expand Down

0 comments on commit c42bb62

Please sign in to comment.