diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-08-06 10:35:14 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-08-06 10:35:14 +0100 |
| commit | 34c1e9ea2b6389e4bcc86864bcfc34f449e4f677 (patch) | |
| tree | 3f67f257580a84e305ad5c1eb02e36ae5e2f0dc6 /packages/backend/src/server/api/stream | |
| parent | revert AiScript hack for plugins (diff) | |
| parent | merge: don't send real-time updates of replies to blocked users #457 #573 (!566) (diff) | |
| download | sharkey-34c1e9ea2b6389e4bcc86864bcfc34f449e4f677.tar.gz sharkey-34c1e9ea2b6389e4bcc86864bcfc34f449e4f677.tar.bz2 sharkey-34c1e9ea2b6389e4bcc86864bcfc34f449e4f677.zip | |
Merge branch 'develop' into feature/misskey-2024.07
fixing conflicts in `package.json`
Diffstat (limited to 'packages/backend/src/server/api/stream')
| -rw-r--r-- | packages/backend/src/server/api/stream/Connection.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/stream/Connection.ts b/packages/backend/src/server/api/stream/Connection.ts index 96082827f8..c24459c1e1 100644 --- a/packages/backend/src/server/api/stream/Connection.ts +++ b/packages/backend/src/server/api/stream/Connection.ts @@ -205,6 +205,18 @@ export default class Connection { @bindThis private async onNoteStreamMessage(data: GlobalEvents['note']['payload']) { + // we must not send to the frontend information about notes from + // users who blocked the logged-in user, even when they're replies + // to notes the logged-in user can see + if (data.type === 'replied') { + const noteUserId = data.body.body.userId; + if (noteUserId !== null) { + if (this.userIdsWhoBlockingMe.has(noteUserId)) { + return; + } + } + } + this.sendMessageToWs('noteUpdated', { id: data.body.id, type: data.type, |