1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 12:14:18 +00:00

call NoteEntityService.hideNote from streaming API

This commit is contained in:
Hazelnoot
2025-02-25 20:55:24 -05:00
parent 30b2bfb184
commit 18f211e3bc
10 changed files with 22 additions and 1 deletions

View File

@@ -82,7 +82,19 @@ export default abstract class Channel {
return false;
}
constructor(id: string, connection: Connection) {
protected async hideNote(note: Packed<'Note'>): Promise<void> {
if (note.renote) {
await this.hideNote(note.renote);
}
if (note.reply) {
await this.hideNote(note.reply);
}
const meId = this.user?.id ?? null;
await this.noteEntityService.hideNote(note, meId);
}
constructor(id: string, connection: Connection, noteEntityService: NoteEntityService) {
this.id = id;
this.connection = connection;

View File

@@ -64,6 +64,7 @@ class BubbleTimelineChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -50,6 +50,7 @@ class ChannelChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -61,6 +61,7 @@ class GlobalTimelineChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -46,6 +46,7 @@ class HashtagChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -82,6 +82,7 @@ class HomeTimelineChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -99,6 +99,7 @@ class HybridTimelineChannel extends Channel {
}
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -71,6 +71,7 @@ class LocalTimelineChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -49,6 +49,7 @@ class RoleTimelineChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);

View File

@@ -112,6 +112,7 @@ class UserListChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note);
await this.hideNote(clonedNote);
this.connection.cacheNote(clonedNote);