diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-03-24 11:05:37 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-24 11:05:37 +0900 |
| commit | ce340aba7a37394c70b9f3d7cece9cfa5e91d94c (patch) | |
| tree | 99612ea0d039f20e0baa9ca243e8cec0af96b11a /src/server/api/stream | |
| parent | fix bug (diff) | |
| download | sharkey-ce340aba7a37394c70b9f3d7cece9cfa5e91d94c.tar.gz sharkey-ce340aba7a37394c70b9f3d7cece9cfa5e91d94c.tar.bz2 sharkey-ce340aba7a37394c70b9f3d7cece9cfa5e91d94c.zip | |
Refactor (#7394)
* wip
* wip
* wip
* wip
* wip
* Update define.ts
* Update update.ts
* Update user.ts
* wip
* wip
* Update request.ts
* URL
* wip
* wip
* wip
* wip
* Update invite.ts
* Update create.ts
Diffstat (limited to 'src/server/api/stream')
| -rw-r--r-- | src/server/api/stream/channels/games/reversi.ts | 2 | ||||
| -rw-r--r-- | src/server/api/stream/channels/global-timeline.ts | 3 | ||||
| -rw-r--r-- | src/server/api/stream/channels/home-timeline.ts | 3 | ||||
| -rw-r--r-- | src/server/api/stream/channels/hybrid-timeline.ts | 3 | ||||
| -rw-r--r-- | src/server/api/stream/channels/local-timeline.ts | 3 | ||||
| -rw-r--r-- | src/server/api/stream/index.ts | 4 |
6 files changed, 11 insertions, 7 deletions
diff --git a/src/server/api/stream/channels/games/reversi.ts b/src/server/api/stream/channels/games/reversi.ts index 3db338386a..e0e41d9acd 100644 --- a/src/server/api/stream/channels/games/reversi.ts +++ b/src/server/api/stream/channels/games/reversi.ts @@ -26,7 +26,7 @@ export default class extends Channel { childId: body.id }); if (matching == null) return; - publishMainStream(matching.childId, 'reversiInvited', await ReversiMatchings.pack(matching, matching.childId)); + publishMainStream(matching.childId, 'reversiInvited', await ReversiMatchings.pack(matching, { id: matching.childId })); break; } } diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts index e47291de50..c59eb37779 100644 --- a/src/server/api/stream/channels/global-timeline.ts +++ b/src/server/api/stream/channels/global-timeline.ts @@ -42,8 +42,9 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { + const reply = note.reply as PackedNote; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 - if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return; + if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } // 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts index a370580674..b1091a46e1 100644 --- a/src/server/api/stream/channels/home-timeline.ts +++ b/src/server/api/stream/channels/home-timeline.ts @@ -50,8 +50,9 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { + const reply = note.reply as PackedNote; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 - if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return; + if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } // 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts index 678554a012..d769a24373 100644 --- a/src/server/api/stream/channels/hybrid-timeline.ts +++ b/src/server/api/stream/channels/hybrid-timeline.ts @@ -59,8 +59,9 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { + const reply = note.reply as PackedNote; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 - if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return; + if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } // 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts index 2c70f46954..aa0b6c4026 100644 --- a/src/server/api/stream/channels/local-timeline.ts +++ b/src/server/api/stream/channels/local-timeline.ts @@ -44,8 +44,9 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { + const reply = note.reply as PackedNote; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 - if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return; + if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } // 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index 1dcc31d32f..647b890ff8 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -156,8 +156,8 @@ export default class Connection { }; add(note); - if (note.reply) add(note.reply); - if (note.renote) add(note.renote); + if (note.reply) add(note.reply as PackedNote); + if (note.renote) add(note.renote as PackedNote); } @autobind |