mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 04:04:16 +00:00
fix error in UserSuspendService.freezeAll and UserSuspendService.unFreezeAll caused by TypeORM bug
This commit is contained in:
@@ -178,10 +178,8 @@ export class UserSuspendService {
|
|||||||
// Freeze follow relations with all remote users
|
// Freeze follow relations with all remote users
|
||||||
await this.followingsRepository
|
await this.followingsRepository
|
||||||
.createQueryBuilder('following')
|
.createQueryBuilder('following')
|
||||||
.orWhere({
|
.andWhere('following."followeeId" = :id', { id: user.id })
|
||||||
followeeId: user.id,
|
.andWhere('following."followerHost" IS NOT NULL')
|
||||||
followerHost: Not(IsNull()),
|
|
||||||
})
|
|
||||||
.update({
|
.update({
|
||||||
isFollowerHibernated: true,
|
isFollowerHibernated: true,
|
||||||
})
|
})
|
||||||
@@ -195,10 +193,8 @@ export class UserSuspendService {
|
|||||||
.createQueryBuilder('following')
|
.createQueryBuilder('following')
|
||||||
.innerJoin(MiUser, 'follower', 'user.id = following.followerId')
|
.innerJoin(MiUser, 'follower', 'user.id = following.followerId')
|
||||||
.andWhere('follower.isHibernated = false') // Don't unfreeze if the follower is *actually* frozen
|
.andWhere('follower.isHibernated = false') // Don't unfreeze if the follower is *actually* frozen
|
||||||
.andWhere({
|
.andWhere('following."followeeId" = :id', { id: user.id })
|
||||||
followeeId: user.id,
|
.andWhere('following."followerHost" IS NOT NULL')
|
||||||
followerHost: Not(IsNull()),
|
|
||||||
})
|
|
||||||
.update({
|
.update({
|
||||||
isFollowerHibernated: false,
|
isFollowerHibernated: false,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user