mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
fix(backend): チャンネルミュートを有効にしている際にノートの閲覧ができなくなることがある問題を修正 (#17251)
* fix(backend): チャンネルミュート使用時にユーザーのノート一覧読み込みに失敗する問題を修正 * more fix * Update Changelog
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
- Fix: 自分の行ったフォロワー限定投稿または指名投稿に自分自身でリアクションなどを行った場合のイベントが流れない問題を修正
|
- Fix: 自分の行ったフォロワー限定投稿または指名投稿に自分自身でリアクションなどを行った場合のイベントが流れない問題を修正
|
||||||
- Fix: 署名付きGETリクエストにおいてAcceptヘッダを署名の対象から除外(Acceptヘッダを正規化するCDNやリバースプロキシを使用している際に挙動がおかしくなる問題を修正)
|
- Fix: 署名付きGETリクエストにおいてAcceptヘッダを署名の対象から除外(Acceptヘッダを正規化するCDNやリバースプロキシを使用している際に挙動がおかしくなる問題を修正)
|
||||||
- Fix: WebSocket接続におけるノートの非表示ロジックを修正
|
- Fix: WebSocket接続におけるノートの非表示ロジックを修正
|
||||||
|
- Fix: チャンネルミュートを有効にしている際に、一部のタイムラインやノート一覧が空になる問題を修正
|
||||||
|
|
||||||
|
|
||||||
## 2026.3.1
|
## 2026.3.1
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointServ
|
|||||||
import { MiLocalUser } from '@/models/User.js';
|
import { MiLocalUser } from '@/models/User.js';
|
||||||
import { ChannelMutingService } from '@/core/ChannelMutingService.js';
|
import { ChannelMutingService } from '@/core/ChannelMutingService.js';
|
||||||
import { ApiError } from '../../error.js';
|
import { ApiError } from '../../error.js';
|
||||||
|
import { Brackets } from 'typeorm';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['notes', 'channels'],
|
tags: ['notes', 'channels'],
|
||||||
@@ -132,7 +133,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
.then(x => x.map(x => x.id).filter(x => x !== ps.channelId));
|
.then(x => x.map(x => x.id).filter(x => x !== ps.channelId));
|
||||||
if (mutingChannelIds.length > 0) {
|
if (mutingChannelIds.length > 0) {
|
||||||
query.andWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
query.andWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
||||||
query.andWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
query.andWhere(new Brackets(qb => {
|
||||||
|
qb.orWhere('note.renoteChannelId IS NULL');
|
||||||
|
qb.orWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
@@ -177,7 +177,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
.andWhere('note.channelId IS NULL')
|
.andWhere('note.channelId IS NULL')
|
||||||
.andWhere('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds });
|
.andWhere('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds });
|
||||||
if (mutingChannelIds.length > 0) {
|
if (mutingChannelIds.length > 0) {
|
||||||
qb.andWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
qb.andWhere(new Brackets(qb2 => {
|
||||||
|
qb2.orWhere('note.renoteChannelId IS NULL');
|
||||||
|
qb2.orWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
} else if (followingChannelIds.length > 0) {
|
} else if (followingChannelIds.length > 0) {
|
||||||
|
|||||||
@@ -185,7 +185,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
if (ps.withChannelNotes) {
|
if (ps.withChannelNotes) {
|
||||||
query.andWhere(new Brackets(qb => {
|
query.andWhere(new Brackets(qb => {
|
||||||
if (mutingChannelIds.length > 0) {
|
if (mutingChannelIds.length > 0) {
|
||||||
qb.andWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds: mutingChannelIds });
|
qb.andWhere(new Brackets(qb2 => {
|
||||||
|
qb2.orWhere('note.channelId IS NULL');
|
||||||
|
qb2.orWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds });
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isSelf) {
|
if (!isSelf) {
|
||||||
|
|||||||
Reference in New Issue
Block a user