summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/Connection.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-08-09 14:44:36 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-08-09 14:44:36 +0900
commit1e92bb4a0a0df1ac15aed9f58dfd318e591468d4 (patch)
tree9e211d108199cc9a03cb74357019c2fb748b117f /packages/backend/src/server/api/stream/Connection.ts
parentenhance: ユーザー検索を制限できるように (#16380) (diff)
downloadmisskey-1e92bb4a0a0df1ac15aed9f58dfd318e591468d4.tar.gz
misskey-1e92bb4a0a0df1ac15aed9f58dfd318e591468d4.tar.bz2
misskey-1e92bb4a0a0df1ac15aed9f58dfd318e591468d4.zip
chore(backend): remove unused codes
Diffstat (limited to 'packages/backend/src/server/api/stream/Connection.ts')
-rw-r--r--packages/backend/src/server/api/stream/Connection.ts21
1 files changed, 0 insertions, 21 deletions
diff --git a/packages/backend/src/server/api/stream/Connection.ts b/packages/backend/src/server/api/stream/Connection.ts
index c9801d8314..8e28ab263b 100644
--- a/packages/backend/src/server/api/stream/Connection.ts
+++ b/packages/backend/src/server/api/stream/Connection.ts
@@ -32,7 +32,6 @@ export default class Connection {
public subscriber: StreamEventEmitter;
private channels: Channel[] = [];
private subscribingNotes: Partial<Record<string, number>> = {};
- private cachedNotes: Packed<'Note'>[] = [];
public userProfile: MiUserProfile | null = null;
public following: Record<string, Pick<MiFollowing, 'withReplies'> | undefined> = {};
public followingChannels: Set<string> = new Set();
@@ -133,26 +132,6 @@ export default class Connection {
}
@bindThis
- public cacheNote(note: Packed<'Note'>) {
- const add = (note: Packed<'Note'>) => {
- const existIndex = this.cachedNotes.findIndex(n => n.id === note.id);
- if (existIndex > -1) {
- this.cachedNotes[existIndex] = note;
- return;
- }
-
- this.cachedNotes.unshift(note);
- if (this.cachedNotes.length > 32) {
- this.cachedNotes.splice(32);
- }
- };
-
- add(note);
- if (note.reply) add(note.reply);
- if (note.renote) add(note.renote);
- }
-
- @bindThis
private onReadNotification(payload: JsonValue | undefined) {
this.notificationService.readAllNotification(this.user!.id);
}