summaryrefslogtreecommitdiff
path: root/src/server/api/stream/channels
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/stream/channels')
-rw-r--r--src/server/api/stream/channels/global-timeline.ts2
-rw-r--r--src/server/api/stream/channels/home-timeline.ts2
-rw-r--r--src/server/api/stream/channels/hybrid-timeline.ts5
-rw-r--r--src/server/api/stream/channels/local-timeline.ts5
4 files changed, 6 insertions, 8 deletions
diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts
index 2cb138966f..384ed61409 100644
--- a/src/server/api/stream/channels/global-timeline.ts
+++ b/src/server/api/stream/channels/global-timeline.ts
@@ -43,7 +43,7 @@ export default class extends Channel {
// 関係ない返信は除外
if (note.reply) {
- const reply = note.reply as PackedNote;
+ const reply = note.reply;
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}
diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts
index c7a9728741..0e21ab552e 100644
--- a/src/server/api/stream/channels/home-timeline.ts
+++ b/src/server/api/stream/channels/home-timeline.ts
@@ -51,7 +51,7 @@ export default class extends Channel {
// 関係ない返信は除外
if (note.reply) {
- const reply = note.reply as PackedNote;
+ const reply = note.reply;
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}
diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts
index 5c454764ec..0b28ff616b 100644
--- a/src/server/api/stream/channels/hybrid-timeline.ts
+++ b/src/server/api/stream/channels/hybrid-timeline.ts
@@ -4,7 +4,6 @@ import Channel from '../channel';
import { fetchMeta } from '@/misc/fetch-meta';
import { Notes } from '@/models/index';
import { PackedNote } from '@/models/repositories/note';
-import { PackedUser } from '@/models/repositories/user';
import { checkWordMute } from '@/misc/check-word-mute';
import { isBlockerUserRelated } from '@/misc/is-blocker-user-related';
@@ -31,7 +30,7 @@ export default class extends Channel {
if (!(
(note.channelId == null && this.user!.id === note.userId) ||
(note.channelId == null && this.following.has(note.userId)) ||
- (note.channelId == null && ((note.user as PackedUser).host == null && note.visibility === 'public')) ||
+ (note.channelId == null && (note.user.host == null && note.visibility === 'public')) ||
(note.channelId != null && this.followingChannels.has(note.channelId))
)) return;
@@ -60,7 +59,7 @@ export default class extends Channel {
// 関係ない返信は除外
if (note.reply) {
- const reply = note.reply as PackedNote;
+ const reply = note.reply;
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}
diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts
index 4bf0d02ed3..20061410c4 100644
--- a/src/server/api/stream/channels/local-timeline.ts
+++ b/src/server/api/stream/channels/local-timeline.ts
@@ -4,7 +4,6 @@ import Channel from '../channel';
import { fetchMeta } from '@/misc/fetch-meta';
import { Notes } from '@/models/index';
import { PackedNote } from '@/models/repositories/note';
-import { PackedUser } from '@/models/repositories/user';
import { checkWordMute } from '@/misc/check-word-mute';
import { isBlockerUserRelated } from '@/misc/is-blocker-user-related';
@@ -26,7 +25,7 @@ export default class extends Channel {
@autobind
private async onNote(note: PackedNote) {
- if ((note.user as PackedUser).host !== null) return;
+ if (note.user.host !== null) return;
if (note.visibility !== 'public') return;
if (note.channelId != null && !this.followingChannels.has(note.channelId)) return;
@@ -45,7 +44,7 @@ export default class extends Channel {
// 関係ない返信は除外
if (note.reply) {
- const reply = note.reply as PackedNote;
+ const reply = note.reply;
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}