Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sakuhanight committed Nov 24, 2024
1 parent 65ff7b1 commit 8dad086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/backend/src/core/UserBlockingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ export class UserBlockingService implements OnModuleInit {
// Since we already have the blocker and blockee, we do not need to fetch
// them in the query above and can just manually insert them here.
// But we don't need to do this because we are not using them in this function.
// blocking.blocker = blocker;
// blocking.blockee = blockee;
blocking.blocker = blocker;
blocking.blockee = blockee;

await this.blockingsRepository.delete(blocking.id);

Expand All @@ -214,7 +214,7 @@ export class UserBlockingService implements OnModuleInit {
public async checkBlocked(blockerId: MiUser['id'], blockeeId: MiUser['id']): Promise<boolean> {
return (await this.cacheService.userBlockingCache.fetch(blockerId)).has(blockeeId);
}

@bindThis
public async reactionBlock(blocker: MiUser, blockee: MiUser, silent = false) {
const blocking = await this.blockingsRepository.findOneBy({
Expand Down
2 changes: 2 additions & 0 deletions packages/backend/test/e2e/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ describe('ユーザー', () => {
hasPendingFollowRequestToYou: user.hasPendingFollowRequestToYou ?? false,
isBlocking: user.isBlocking ?? false,
isBlocked: user.isBlocked ?? false,
isReactionBlocking: user.isReactionBlocking ?? false,
isReactionBlocked: user.isReactionBlocked ?? false,
isMuted: user.isMuted ?? false,
isRenoteMuted: user.isRenoteMuted ?? false,
notify: user.notify ?? 'none',
Expand Down

0 comments on commit 8dad086

Please sign in to comment.