fix list and instance caching, manage all CacheService caches, and fix list "with replies" setting
This commit is contained in:
parent
bb0925224d
commit
2daf5c16ec
15 changed files with 466 additions and 386 deletions
|
|
@ -19,7 +19,8 @@ import { LoggerService } from '@/core/LoggerService.js';
|
|||
import { UserWebhookService } from '@/core/UserWebhookService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { CacheService } from '@/core/CacheService.js';
|
||||
import { UserFollowingService } from '@/core/UserFollowingService.js';
|
||||
import type { UserFollowingService } from '@/core/UserFollowingService.js';
|
||||
import { UserListService } from '@/core/UserListService.js';
|
||||
|
||||
@Injectable()
|
||||
export class UserBlockingService implements OnModuleInit {
|
||||
|
|
@ -140,16 +141,12 @@ export class UserBlockingService implements OnModuleInit {
|
|||
|
||||
@bindThis
|
||||
private async removeFromList(listOwner: MiUser, user: MiUser) {
|
||||
const userLists = await this.userListsRepository.findBy({
|
||||
userId: listOwner.id,
|
||||
const userLists = await this.userListsRepository.find({
|
||||
where: { userId: listOwner.id },
|
||||
select: { id: true },
|
||||
});
|
||||
|
||||
for (const userList of userLists) {
|
||||
await this.userListMembershipsRepository.delete({
|
||||
userListId: userList.id,
|
||||
userId: user.id,
|
||||
});
|
||||
}
|
||||
await this.userListService.bulkRemoveMember(user, userLists.map(l => l.id));
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue