From 024546206d17b728b67769091b4aa700df2181e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:46:04 +0900 Subject: [PATCH 01/16] =?UTF-8?q?feat(AiScript):=20Mk:nyaize()=20=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20(#12136)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(AiScript): Mk:nyaize * Update Changelog * Fix relative path --- CHANGELOG.md | 1 + packages/frontend/src/scripts/aiscript/api.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f875b4b70..c693748f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Feat: プラグイン・テーマを外部サイトから直接インストールできるようになりました - 外部サイトでの実装が必要です。詳細は Misskey Hub をご覧ください https://misskey-hub.net/docs/advanced/publish-on-your-website.html +- Feat: AiScript関数`Mk:nyaize()`が追加されました - Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正 ### Server diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts index 032853f7ad..fb7ab924b7 100644 --- a/packages/frontend/src/scripts/aiscript/api.ts +++ b/packages/frontend/src/scripts/aiscript/api.ts @@ -9,6 +9,7 @@ import { $i } from '@/account.js'; import { miLocalStorage } from '@/local-storage.js'; import { customEmojis } from '@/custom-emojis.js'; import { url, lang } from '@/config.js'; +import { nyaize } from '@/scripts/nyaize.js'; export function createAiScriptEnv(opts) { return { @@ -71,5 +72,9 @@ export function createAiScriptEnv(opts) { 'Mk:url': values.FN_NATIVE(() => { return values.STR(window.location.href); }), + 'Mk:nyaize': values.FN_NATIVE(([text]) => { + utils.assertString(text); + return values.STR(nyaize(text.value)); + }), }; } From dc0582739f8c02be1b7297132872dffd8f3e4755 Mon Sep 17 00:00:00 2001 From: ikasoba <57828948+ikasoba@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:19:43 +0900 Subject: [PATCH 02/16] =?UTF-8?q?Fix:=20STL=E3=81=A7=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D=E3=83=AB=E3=81=8C=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#12143)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * タイムラインをpostgresから取得する際にフォローしていないチャンネルが取得されるのを修正 * CHANGELOGに追記 --- CHANGELOG.md | 1 + .../api/endpoints/notes/hybrid-timeline.ts | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c693748f67..3decae2b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - Fix: ローカルタイムラインに投稿者自身の投稿への返信が含まれない問題を修正 - Fix: 自分のフォローしているユーザーの自分のフォローしていないユーザーの visibility: followers な投稿への返信がストリーミングで流れてくる問題を修正 - Fix: RedisへのTLキャッシュが有効の場合にHTL/LTL/STLが空になることがある問題を修正 +- Fix: STLでフォローしていないチャンネルが取得される問題を修正 ## 2023.10.2 diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 7d0c9f1185..4eeec563d7 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -5,7 +5,7 @@ import { Brackets } from 'typeorm'; import { Inject, Injectable } from '@nestjs/common'; -import type { NotesRepository, FollowingsRepository, MiNote } from '@/models/_.js'; +import type { NotesRepository, FollowingsRepository, MiNote, ChannelFollowingsRepository } from '@/models/_.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; @@ -69,6 +69,9 @@ export default class extends Endpoint { // eslint- @Inject(DI.notesRepository) private notesRepository: NotesRepository, + @Inject(DI.channelFollowingsRepository) + private channelFollowingsRepository: ChannelFollowingsRepository, + private noteEntityService: NoteEntityService, private roleService: RoleService, private activeUsersChart: ActiveUsersChart, @@ -208,6 +211,11 @@ export default class extends Endpoint { // eslint- withReplies: boolean, }, me: MiLocalUser) { const followees = await this.userFollowingService.getFollowees(me.id); + const followingChannels = await this.channelFollowingsRepository.find({ + where: { + followerId: me.id, + }, + }); const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) .andWhere(new Brackets(qb => { @@ -226,6 +234,14 @@ export default class extends Endpoint { // eslint- .leftJoinAndSelect('reply.user', 'replyUser') .leftJoinAndSelect('renote.user', 'renoteUser'); + if (followingChannels.length > 0) { + const followingChannelIds = followingChannels.map(x => x.followeeId); + + query.andWhere('note.channelId IN (:...followingChannelIds) OR note.channelId IS NULL', { followingChannelIds }); + } else { + query.andWhere('note.channelId IS NULL'); + } + if (!ps.withReplies) { query.andWhere(new Brackets(qb => { qb From 1d9b5ae1ba6d98cb496367d955fd691371d31f71 Mon Sep 17 00:00:00 2001 From: Lya <114819113+L-y-a@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:20:36 +0900 Subject: [PATCH 03/16] =?UTF-8?q?chore(frontend):=20=E7=B5=B5=E6=96=87?= =?UTF-8?q?=E5=AD=97=E5=90=8D=E3=81=AE=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=A7autocapitalize=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(#12139)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkEmojiPicker.vue | 2 +- packages/frontend/src/components/MkInput.vue | 2 ++ packages/frontend/src/pages/about.emojis.vue | 2 +- packages/frontend/src/pages/custom-emojis-manager.vue | 4 ++-- packages/frontend/src/pages/emoji-edit-dialog.vue | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 7eff637482..5b420c499e 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only