From 2dfbf97db4fd18632cbbee5d1ec5fa83e29f9978 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Oct 2023 07:59:58 +0900 Subject: [PATCH] refactor --- packages/backend/src/server/api/stream/channels/channel.ts | 2 +- .../backend/src/server/api/stream/channels/global-timeline.ts | 2 +- packages/backend/src/server/api/stream/channels/hashtag.ts | 2 +- .../backend/src/server/api/stream/channels/home-timeline.ts | 2 +- .../backend/src/server/api/stream/channels/hybrid-timeline.ts | 2 +- .../backend/src/server/api/stream/channels/local-timeline.ts | 2 +- packages/backend/src/server/api/stream/channels/user-list.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index 251350dda..4d85e1cee 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -48,7 +48,7 @@ class ChannelChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } } diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts index 9c623abf7..18b8e8245 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -74,7 +74,7 @@ class GlobalTimelineChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } } diff --git a/packages/backend/src/server/api/stream/channels/hashtag.ts b/packages/backend/src/server/api/stream/channels/hashtag.ts index 247145d8c..fb9226413 100644 --- a/packages/backend/src/server/api/stream/channels/hashtag.ts +++ b/packages/backend/src/server/api/stream/channels/hashtag.ts @@ -53,7 +53,7 @@ class HashtagChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } } diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts index eed5c699d..691484153 100644 --- a/packages/backend/src/server/api/stream/channels/home-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts @@ -76,7 +76,7 @@ class HomeTimelineChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } } diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index d9b5cafc8..c353aaac0 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -90,7 +90,7 @@ class HybridTimelineChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } } diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts index 2424b468d..0823799d2 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -73,7 +73,7 @@ class LocalTimelineChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } } diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index c3b4c9d74..a5a9d189b 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -105,7 +105,7 @@ class UserListChannel extends Channel { if (this.user && note.renoteId && !note.text) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renoteId, this.user.id); - note.renote!.myReaction = myRenoteReaction; + note.renote.myReaction = myRenoteReaction; } }