fix
This commit is contained in:
parent
65ff7b1f6a
commit
8dad086e1c
|
@ -190,8 +190,8 @@ export class UserBlockingService implements OnModuleInit {
|
||||||
// Since we already have the blocker and blockee, we do not need to fetch
|
// 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.
|
// 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.
|
// But we don't need to do this because we are not using them in this function.
|
||||||
// blocking.blocker = blocker;
|
blocking.blocker = blocker;
|
||||||
// blocking.blockee = blockee;
|
blocking.blockee = blockee;
|
||||||
|
|
||||||
await this.blockingsRepository.delete(blocking.id);
|
await this.blockingsRepository.delete(blocking.id);
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ export class UserBlockingService implements OnModuleInit {
|
||||||
public async checkBlocked(blockerId: MiUser['id'], blockeeId: MiUser['id']): Promise<boolean> {
|
public async checkBlocked(blockerId: MiUser['id'], blockeeId: MiUser['id']): Promise<boolean> {
|
||||||
return (await this.cacheService.userBlockingCache.fetch(blockerId)).has(blockeeId);
|
return (await this.cacheService.userBlockingCache.fetch(blockerId)).has(blockeeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async reactionBlock(blocker: MiUser, blockee: MiUser, silent = false) {
|
public async reactionBlock(blocker: MiUser, blockee: MiUser, silent = false) {
|
||||||
const blocking = await this.blockingsRepository.findOneBy({
|
const blocking = await this.blockingsRepository.findOneBy({
|
||||||
|
|
|
@ -98,6 +98,8 @@ describe('ユーザー', () => {
|
||||||
hasPendingFollowRequestToYou: user.hasPendingFollowRequestToYou ?? false,
|
hasPendingFollowRequestToYou: user.hasPendingFollowRequestToYou ?? false,
|
||||||
isBlocking: user.isBlocking ?? false,
|
isBlocking: user.isBlocking ?? false,
|
||||||
isBlocked: user.isBlocked ?? false,
|
isBlocked: user.isBlocked ?? false,
|
||||||
|
isReactionBlocking: user.isReactionBlocking ?? false,
|
||||||
|
isReactionBlocked: user.isReactionBlocked ?? false,
|
||||||
isMuted: user.isMuted ?? false,
|
isMuted: user.isMuted ?? false,
|
||||||
isRenoteMuted: user.isRenoteMuted ?? false,
|
isRenoteMuted: user.isRenoteMuted ?? false,
|
||||||
notify: user.notify ?? 'none',
|
notify: user.notify ?? 'none',
|
||||||
|
|
Loading…
Reference in New Issue