Merge tag '2023.9.2' into merge-upstream

This commit is contained in:
riku6460 2023-09-29 22:16:04 +09:00
commit e2c9ed355b
No known key found for this signature in database
GPG key ID: 27414FA27DB94CF6
144 changed files with 2519 additions and 1660 deletions

View file

@ -17,6 +17,7 @@ class HomeTimelineChannel extends Channel {
public static shouldShare = true;
public static requireCredential = true;
private withReplies: boolean;
private withRenotes: boolean;
private withFiles: boolean;
constructor(
@ -31,8 +32,9 @@ class HomeTimelineChannel extends Channel {
@bindThis
public async init(params: any) {
this.withReplies = params.withReplies as boolean;
this.withFiles = params.withFiles as boolean;
this.withReplies = params.withReplies ?? false;
this.withRenotes = params.withRenotes ?? true;
this.withFiles = params.withFiles ?? false;
this.subscriber.on('notesStream', this.onNote);
}
@ -82,6 +84,8 @@ class HomeTimelineChannel extends Channel {
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}
if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (isUserRelated(note, this.userIdsWhoMeMuting)) return;
// 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する