feat: 凍結されたユーザーのコンテンツを見えないようにする (MisskeyIO#134)

ついでにEntityServiceの型定義、meのoptionalをやめる
This commit is contained in:
まっちゃとーにゅ 2023-08-08 20:13:05 +09:00 committed by GitHub
parent 3b73874196
commit 7f0acd3ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 742 additions and 325 deletions

View file

@ -54,7 +54,7 @@ const mutedWordsCache = new MemorySingleCache<{ userId: UserProfile['userId']; m
type NotificationType = 'reply' | 'renote' | 'quote' | 'mention';
class NotificationManager {
private notifier: { id: User['id']; };
private notifier: { id: User['id'] };
private note: Note;
private queue: {
target: LocalUser['id'];
@ -64,7 +64,7 @@ class NotificationManager {
constructor(
private mutingsRepository: MutingsRepository,
private notificationService: NotificationService,
notifier: { id: User['id']; },
notifier: { id: User['id'] },
note: Note,
) {
this.notifier = notifier;
@ -547,7 +547,7 @@ export class NoteCreateService implements OnApplicationShutdown {
}
// Pack the note
const noteObj = await this.noteEntityService.pack(note);
const noteObj = await this.noteEntityService.pack(note, user);
this.globalEventService.publishNotesStream(noteObj);
@ -767,7 +767,7 @@ export class NoteCreateService implements OnApplicationShutdown {
}
@bindThis
private incNotesCountOfUser(user: { id: User['id']; }) {
private incNotesCountOfUser(user: { id: User['id'] }) {
this.usersRepository.createQueryBuilder().update()
.set({
updatedAt: new Date(),