mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-12-11 09:28:24 +00:00
fix error in UserSuspendService.freezeAll and UserSuspendService.unFreezeAll caused by TypeORM bug
This commit is contained in:
parent
51ad31b5a4
commit
f937f2d3c6
1 changed files with 4 additions and 8 deletions
|
|
@ -178,10 +178,8 @@ export class UserSuspendService {
|
|||
// Freeze follow relations with all remote users
|
||||
await this.followingsRepository
|
||||
.createQueryBuilder('following')
|
||||
.orWhere({
|
||||
followeeId: user.id,
|
||||
followerHost: Not(IsNull()),
|
||||
})
|
||||
.andWhere('following."followeeId" = :id', { id: user.id })
|
||||
.andWhere('following."followerHost" IS NOT NULL')
|
||||
.update({
|
||||
isFollowerHibernated: true,
|
||||
})
|
||||
|
|
@ -195,10 +193,8 @@ export class UserSuspendService {
|
|||
.createQueryBuilder('following')
|
||||
.innerJoin(MiUser, 'follower', 'user.id = following.followerId')
|
||||
.andWhere('follower.isHibernated = false') // Don't unfreeze if the follower is *actually* frozen
|
||||
.andWhere({
|
||||
followeeId: user.id,
|
||||
followerHost: Not(IsNull()),
|
||||
})
|
||||
.andWhere('following."followeeId" = :id', { id: user.id })
|
||||
.andWhere('following."followerHost" IS NOT NULL')
|
||||
.update({
|
||||
isFollowerHibernated: false,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue