Merge branch 'develop' into sha-033

This commit is contained in:
tamaina 2024-02-19 21:39:10 +09:00 committed by GitHub
commit 51863e33be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 33 additions and 1 deletions

View File

@ -11,6 +11,16 @@
-
-->
## 202x.x.x (unreleased)
### General
### Client
- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
### Server
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正
## 2024.2.0

View File

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class RepositoryUrlFromSyuiloToMisskeyDev1708266695091 {
name = 'RepositoryUrlFromSyuiloToMisskeyDev1708266695091'
async up(queryRunner) {
await queryRunner.query(`UPDATE "meta" SET "repositoryUrl" = 'https://github.com/misskey-dev/misskey' WHERE "repositoryUrl" = 'https://github.com/syuilo/misskey'`);
}
async down(queryRunner) {
// no valid down migration
}
}

View File

@ -253,6 +253,8 @@ export class MiMeta {
})
public turnstileSecretKey: string | null;
// chaptcha系を追加した際にはnodeinfoのレスポンスに追加するのを忘れないようにすること
@Column('enum', {
enum: ['none', 'all', 'local', 'remote'],
default: 'none',

View File

@ -117,6 +117,8 @@ export class NodeinfoServerService {
emailRequiredForSignup: meta.emailRequiredForSignup,
enableHcaptcha: meta.enableHcaptcha,
enableRecaptcha: meta.enableRecaptcha,
enableMcaptcha: meta.enableMcaptcha,
enableTurnstile: meta.enableTurnstile,
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH,
enableEmail: meta.enableEmail,
enableServiceWorker: meta.enableServiceWorker,

View File

@ -93,9 +93,11 @@ export class Autocomplete {
return;
}
const afterLastMfmParam = text.split(/\$\[[a-zA-Z]+/).pop();
const isMention = mentionIndex !== -1;
const isHashtag = hashtagIndex !== -1;
const isMfmParam = mfmParamIndex !== -1 && text.split(/\$\[[a-zA-Z]+/).pop()?.includes('.');
const isMfmParam = mfmParamIndex !== -1 && afterLastMfmParam?.includes('.') && !afterLastMfmParam?.includes(' ');
const isMfmTag = mfmTagIndex !== -1 && !isMfmParam;
const isEmoji = emojiIndex !== -1 && text.split(/:[a-z0-9_+\-]+:/).pop()!.includes(':');