Compare commits

...

21 Commits

Author SHA1 Message Date
Sayamame-beans
3b975bad7f
Merge 61820c403e into e8bf6285cb 2024-12-15 07:02:25 +00:00
Sayamame-beans
61820c403e
chore: update Changelog insert position 2024-12-15 16:02:22 +09:00
Sayamame-beans
60738110a5
Merge branch 'develop' into mute_note_has_muting_mention 2024-12-15 15:58:54 +09:00
かっこかり
e8bf6285cb
fix(frontend): ノートがログインしているユーザーしか見れない場合にログインをキャンセルした場合その後の動線がなくなる問題を修正 (#15101)
* fix(frontend): ノートがログインしているユーザーしか見れない場合にログインをキャンセルすると一切の処理が停止する問題を修正

* Update Changelog

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
2024-12-10 10:42:12 +09:00
かっこかり
074b7b0bee
fix(frontend): 公開範囲がホームのノートの埋め込みウィジェットが読み込まれない問題を修正 (#15102)
* Resolve frontend/backend contradiction for home visibility embeds

This now uses the same check from `packages/frontend/src/scripts/get-note-menu.ts`

* Update Changelog

---------

Co-authored-by: CenTdemeern1 <timo.herngreen@gmail.com>
2024-12-10 10:36:03 +09:00
かっこかり
020c191e2c
fix(frontend): MiAuth認可画面のデザイン修正 (#15106) 2024-12-10 10:29:40 +09:00
Sayamame-beans
b8926866f7 fix(backend): lack of muting empty check 2024-11-21 13:17:43 +00:00
Sayamame-beans
629322f7c8
Merge branch 'develop' into mute_note_has_muting_mention 2024-11-21 17:47:44 +09:00
Sayamame-beans
400aafddd7
Merge branch 'develop' into mute_note_has_muting_mention 2024-11-19 22:49:40 +09:00
Sayamame-beans
597412abcc fix(backend): incorrect typing with query 2024-11-19 13:11:33 +00:00
Sayamame-beans
590d5dd0bf
Merge branch 'develop' into mute_note_has_muting_mention 2024-11-19 19:24:59 +09:00
Sayamame-beans
32f4b639c9 fix(backend): fix lint 2024-11-18 23:35:23 +09:00
Sayamame-beans
36ae25e4bc
Merge branch 'develop' into mute_note_has_muting_mention 2024-11-18 23:18:15 +09:00
Sayamame-beans
bcf255a00b docs(changelog): update changelog 2024-11-18 23:13:37 +09:00
Sayamame-beans
446238026a fix(backend): mention was not considered for mute (query ver) 2024-11-18 22:58:39 +09:00
Sayamame-beans
6d07f683eb Revert "docs(changelog): update changelog"
This reverts commit 0bcd79b577.
2024-07-15 22:48:20 +09:00
Sayamame-beans
3d2b495829 Revert "fix(backend): visibleUserIds was not considered for mute"
This reverts commit b8a4a33695.
2024-07-15 22:48:13 +09:00
Sayamame-beans
0bcd79b577 docs(changelog): update changelog 2024-06-23 12:19:18 +00:00
Sayamame-beans
51e4897fb8 docs(changelog): update changelog 2024-06-23 12:18:23 +00:00
Sayamame-beans
b8a4a33695 fix(backend): visibleUserIds was not considered for mute 2024-06-23 12:15:44 +00:00
Sayamame-beans
959aba6b13 fix(backend): mention was not considered for mute 2024-06-23 12:14:46 +00:00
7 changed files with 35 additions and 3 deletions

View File

@ -6,11 +6,16 @@
### Client
- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
- Fix: サーバー情報メニューに区切り線が不足していたのを修正
- Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正
- Fix: 公開範囲がホームのノートの埋め込みウィジェットが読み込まれない問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/803)
### Server
- Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 )
- Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737)
- Fix: ユーザーミュートにおいて、ノート内のメンションが考慮されていなかった問題を修正
- これにより、第三者から自分に対するノートを意図せず取り逃してしまう可能性があったため、通知欄ではメンションを考慮しないままになっています
## 2024.11.0

View File

@ -127,13 +127,18 @@ export class QueryService {
}
@bindThis
public generateMutedUserQuery(q: SelectQueryBuilder<any>, me: { id: MiUser['id'] }, exclude?: { id: MiUser['id'] }): void {
public generateMutedUserQuery(q: SelectQueryBuilder<any>, me: { id: MiUser['id'] }, exclude?: { id: MiUser['id'] }, checkMentions = true): void {
const mutingQuery = this.mutingsRepository.createQueryBuilder('muting')
.select('muting.muteeId')
.where('muting.muterId = :muterId', { muterId: me.id });
const mutingArrayQuery = this.mutingsRepository.createQueryBuilder('muting')
.select('array_agg(muting.muteeId)', 'muting.muteeIdArray')
.where('muting.muterId = :muterId', { muterId: me.id });
if (exclude) {
mutingQuery.andWhere('muting.muteeId != :excludeId', { excludeId: exclude.id });
mutingArrayQuery.andWhere('muting.muteeId != :excludeId', { excludeId: exclude.id });
}
const mutingInstanceQuery = this.userProfilesRepository.createQueryBuilder('user_profile')
@ -172,7 +177,18 @@ export class QueryService {
.orWhere(`NOT ((${ mutingInstanceQuery.getQuery() })::jsonb ? note.renoteUserHost)`);
}));
// 投稿に含まれるメンションの相手をミュートしていない
if (checkMentions) {
q.andWhere(new Brackets(qb => {
qb
.where('note.mentions IS NULL')
.orWhere(`NOT EXISTS (${ mutingQuery.getQuery() })`)
.orWhere(`NOT (note.mentions && (${ mutingArrayQuery.getQuery() }))`);
}));
}
q.setParameters(mutingQuery.getParameters());
q.setParameters(mutingArrayQuery.getParameters());
q.setParameters(mutingInstanceQuery.getParameters());
}

View File

@ -12,6 +12,10 @@ export function isUserRelated(note: any, userIds: Set<string>, ignoreAuthor = fa
return true;
}
if (note.mentions != null && note.mentions.filter((userId: string) => userId !== note.userId && userIds.has(userId)).length > 0) {
return true;
}
if (note.reply != null && note.reply.userId !== note.userId && userIds.has(note.reply.userId)) {
return true;
}

View File

@ -74,7 +74,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('renote.user', 'renoteUser');
this.queryService.generateVisibilityQuery(query, me);
this.queryService.generateMutedUserQuery(query, me);
this.queryService.generateMutedUserQuery(query, me, undefined, false); // 通知系ではメンションを確認しないようにする
this.queryService.generateMutedNoteThreadQuery(query, me);
this.queryService.generateBlockedUserQuery(query, me);

View File

@ -871,7 +871,7 @@ export class ClientServerService {
});
if (note == null) return;
if (note.visibility !== 'public') return;
if (['specified', 'followers'].includes(note.visibility)) return;
if (note.userHost != null) return;
const _note = await this.noteEntityService.pack(note, null, { detail: true });

View File

@ -117,5 +117,6 @@ definePageMetadata(() => ({
border-radius: var(--MI-radius);
background-color: var(--MI_THEME-panel);
overflow-x: scroll;
white-space: nowrap;
}
</style>

View File

@ -50,6 +50,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, watch, ref } from 'vue';
import * as Misskey from 'misskey-js';
import { host } from '@@/js/config.js';
import type { Paging } from '@/components/MkPagination.vue';
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
import MkNotes from '@/components/MkNotes.vue';
@ -140,7 +141,12 @@ function fetchNote() {
}).catch(err => {
if (err.id === '8e75455b-738c-471d-9f80-62693f33372e') {
pleaseLogin({
path: '/',
message: i18n.ts.thisContentsAreMarkedAsSigninRequiredByAuthor,
openOnRemote: {
type: 'lookup',
url: `https://${host}/notes/${props.noteId}`,
},
});
}
error.value = err;