Compare commits
10 commits
851a3e35ae
...
f2eafaab73
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f2eafaab73 | ||
![]() |
7f3b3cf65f | ||
![]() |
4f9aee899f | ||
![]() |
e1ae455e4a | ||
![]() |
3307f86586 | ||
![]() |
88a361e622 | ||
![]() |
6dcda9db5c | ||
![]() |
b5a796ffd1 | ||
![]() |
3750888c6a | ||
![]() |
f7ac3c5493 |
17 changed files with 24 additions and 30 deletions
|
@ -24,7 +24,7 @@ services:
|
||||||
DFLY_snapshot_cron: '* * * * *'
|
DFLY_snapshot_cron: '* * * * *'
|
||||||
DFLY_version_check: false
|
DFLY_version_check: false
|
||||||
DFLY_tcp_backlog: 2048
|
DFLY_tcp_backlog: 2048
|
||||||
DFLY_lock_on_hashtags: true
|
DFLY_default_lua_flags: allow-undeclared-keys
|
||||||
DFLY_pipeline_squash: 0
|
DFLY_pipeline_squash: 0
|
||||||
DFLY_multi_exec_squash: false
|
DFLY_multi_exec_squash: false
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
|
|
4
.github/workflows/test-backend.yml
vendored
4
.github/workflows/test-backend.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DFLY_version_check: false
|
DFLY_version_check: false
|
||||||
DFLY_tcp_backlog: 2048
|
DFLY_tcp_backlog: 2048
|
||||||
DFLY_lock_on_hashtags: true
|
DFLY_default_lua_flags: allow-undeclared-keys
|
||||||
DFLY_pipeline_squash: 0
|
DFLY_pipeline_squash: 0
|
||||||
DFLY_multi_exec_squash: false
|
DFLY_multi_exec_squash: false
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
|
@ -99,7 +99,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DFLY_version_check: false
|
DFLY_version_check: false
|
||||||
DFLY_tcp_backlog: 2048
|
DFLY_tcp_backlog: 2048
|
||||||
DFLY_lock_on_hashtags: true
|
DFLY_default_lua_flags: allow-undeclared-keys
|
||||||
DFLY_pipeline_squash: 0
|
DFLY_pipeline_squash: 0
|
||||||
DFLY_multi_exec_squash: false
|
DFLY_multi_exec_squash: false
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
|
|
|
@ -44,8 +44,8 @@ spec:
|
||||||
value: false
|
value: false
|
||||||
- name: DFLY_tcp_backlog
|
- name: DFLY_tcp_backlog
|
||||||
value: 2048
|
value: 2048
|
||||||
- name: DFLY_lock_on_hashtags
|
- name: DFLY_default_lua_flags
|
||||||
value: true
|
value: allow-undeclared-keys
|
||||||
- name: DFLY_pipeline_squash
|
- name: DFLY_pipeline_squash
|
||||||
value: 0
|
value: 0
|
||||||
- name: DFLY_multi_exec_squash
|
- name: DFLY_multi_exec_squash
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
DFLY_snapshot_cron: '* * * * *'
|
DFLY_snapshot_cron: '* * * * *'
|
||||||
DFLY_version_check: false
|
DFLY_version_check: false
|
||||||
DFLY_tcp_backlog: 2048
|
DFLY_tcp_backlog: 2048
|
||||||
DFLY_lock_on_hashtags: true
|
DFLY_default_lua_flags: allow-undeclared-keys
|
||||||
DFLY_pipeline_squash: 0
|
DFLY_pipeline_squash: 0
|
||||||
DFLY_multi_exec_squash: false
|
DFLY_multi_exec_squash: false
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
|
|
|
@ -32,7 +32,7 @@ services:
|
||||||
DFLY_snapshot_cron: '* * * * *'
|
DFLY_snapshot_cron: '* * * * *'
|
||||||
DFLY_version_check: false
|
DFLY_version_check: false
|
||||||
DFLY_tcp_backlog: 2048
|
DFLY_tcp_backlog: 2048
|
||||||
DFLY_lock_on_hashtags: true
|
DFLY_default_lua_flags: allow-undeclared-keys
|
||||||
DFLY_pipeline_squash: 0
|
DFLY_pipeline_squash: 0
|
||||||
DFLY_multi_exec_squash: false
|
DFLY_multi_exec_squash: false
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "2024.5.0-io.5d",
|
"version": "2024.5.0-io.5e",
|
||||||
"codename": "nasubi",
|
"codename": "nasubi",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -274,12 +274,8 @@ export class AccountMoveService {
|
||||||
|
|
||||||
if (!srcprofile || !dstprofile) return;
|
if (!srcprofile || !dstprofile) return;
|
||||||
|
|
||||||
await this.userProfilesRepository.update({ userId: dst.id }, {
|
await this.userProfilesRepository.update({ userId: In([src.id, dst.id]) }, {
|
||||||
moderationNote: srcprofile.moderationNote + '\n' + dstprofile.moderationNote,
|
moderationNote: (srcprofile.moderationNote + '\n' + dstprofile.moderationNote).trim(),
|
||||||
});
|
|
||||||
|
|
||||||
await this.userProfilesRepository.update({ userId: src.id }, {
|
|
||||||
moderationNote: srcprofile.moderationNote + '\n' + dstprofile.moderationNote,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ export class UtilityService {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public isUriLocal(uri: string): boolean {
|
public isUriLocal(uri: string): boolean {
|
||||||
return this.normalizeHost(this.config.hostname) === this.extractHost(uri);
|
return this.normalizeHost(this.config.host) === this.extractHost(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
|
@ -524,8 +524,8 @@ export class ActivityPubServerService {
|
||||||
},
|
},
|
||||||
deriveConstraint(request: IncomingMessage) {
|
deriveConstraint(request: IncomingMessage) {
|
||||||
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
|
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
|
||||||
const isAp = typeof accepted === 'string' && !accepted.match(/html/);
|
if (accepted === false) return null;
|
||||||
return isAp ? 'ap' : 'html';
|
return accepted !== 'html' ? 'ap' : 'html';
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
title: { type: 'string' },
|
title: { type: 'string' },
|
||||||
name: { type: 'string', minLength: 1 },
|
name: { type: 'string', minLength: 1, pattern: /^[a-zA-Z0-9_-]+$/.toString().slice(1, -1) },
|
||||||
summary: { type: 'string', nullable: true },
|
summary: { type: 'string', nullable: true },
|
||||||
content: { type: 'array', items: {
|
content: { type: 'array', items: {
|
||||||
type: 'object', additionalProperties: true,
|
type: 'object', additionalProperties: true,
|
||||||
|
|
|
@ -57,7 +57,7 @@ export const paramDef = {
|
||||||
properties: {
|
properties: {
|
||||||
pageId: { type: 'string', format: 'misskey:id' },
|
pageId: { type: 'string', format: 'misskey:id' },
|
||||||
title: { type: 'string' },
|
title: { type: 'string' },
|
||||||
name: { type: 'string', minLength: 1 },
|
name: { type: 'string', minLength: 1, pattern: /^[a-zA-Z0-9_-]+$/.toString().slice(1, -1) },
|
||||||
summary: { type: 'string', nullable: true },
|
summary: { type: 'string', nullable: true },
|
||||||
content: { type: 'array', items: {
|
content: { type: 'array', items: {
|
||||||
type: 'object', additionalProperties: true,
|
type: 'object', additionalProperties: true,
|
||||||
|
|
|
@ -534,7 +534,7 @@ export class ClientServerService {
|
||||||
|
|
||||||
vary(reply.raw, 'Accept');
|
vary(reply.raw, 'Accept');
|
||||||
|
|
||||||
if (user != null) {
|
if (user) {
|
||||||
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
|
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
|
||||||
const meta = await this.metaService.fetch();
|
const meta = await this.metaService.fetch();
|
||||||
const me = profile.fields
|
const me = profile.fields
|
||||||
|
@ -564,11 +564,9 @@ export class ClientServerService {
|
||||||
fastify.get<{ Params: { user: string; } }>('/users/:user', async (request, reply) => {
|
fastify.get<{ Params: { user: string; } }>('/users/:user', async (request, reply) => {
|
||||||
const user = await this.usersRepository.findOneBy({
|
const user = await this.usersRepository.findOneBy({
|
||||||
id: request.params.user,
|
id: request.params.user,
|
||||||
host: IsNull(),
|
|
||||||
isSuspended: false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user == null) {
|
if (!user || (user.isDeleted && user.isSuspended)) {
|
||||||
reply.code(404);
|
reply.code(404);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
DFLY_version_check: false
|
DFLY_version_check: false
|
||||||
DFLY_tcp_backlog: 2048
|
DFLY_tcp_backlog: 2048
|
||||||
DFLY_lock_on_hashtags: true
|
DFLY_default_lua_flags: allow-undeclared-keys
|
||||||
DFLY_pipeline_squash: 0
|
DFLY_pipeline_squash: 0
|
||||||
DFLY_multi_exec_squash: false
|
DFLY_multi_exec_squash: false
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
|
|
|
@ -506,7 +506,7 @@ async function assignRole() {
|
||||||
const { canceled: canceled3, result: memo } = await os.inputText({
|
const { canceled: canceled3, result: memo } = await os.inputText({
|
||||||
title: i18n.ts.addMemo,
|
title: i18n.ts.addMemo,
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
placeholder: i18n.ts.memo,
|
default: '',
|
||||||
});
|
});
|
||||||
if (canceled3) return;
|
if (canceled3) return;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ async function assign() {
|
||||||
const { canceled: canceled3, result: memo } = await os.inputText({
|
const { canceled: canceled3, result: memo } = await os.inputText({
|
||||||
title: i18n.ts.addMemo,
|
title: i18n.ts.addMemo,
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
placeholder: i18n.ts.memo,
|
default: '',
|
||||||
});
|
});
|
||||||
if (canceled3) return;
|
if (canceled3) return;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template #label>{{ i18n.ts._pages.summary }}</template>
|
<template #label>{{ i18n.ts._pages.summary }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
|
||||||
<MkInput v-model="name">
|
<MkInput v-model="name" type="text" pattern="^[a-zA-Z0-9_-]+$" autocapitalize="off">
|
||||||
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
|
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
|
||||||
<template #label>{{ i18n.ts._pages.url }}</template>
|
<template #label>{{ i18n.ts._pages.url }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
@ -158,7 +158,7 @@ function save() {
|
||||||
|
|
||||||
if (pageId.value) {
|
if (pageId.value) {
|
||||||
options.pageId = pageId.value;
|
options.pageId = pageId.value;
|
||||||
misskeyApi('pages/update', options)
|
os.apiWithDialog('pages/update', options)
|
||||||
.then(page => {
|
.then(page => {
|
||||||
currentName.value = name.value.trim();
|
currentName.value = name.value.trim();
|
||||||
os.alert({
|
os.alert({
|
||||||
|
@ -167,7 +167,7 @@ function save() {
|
||||||
});
|
});
|
||||||
}).catch(onError);
|
}).catch(onError);
|
||||||
} else {
|
} else {
|
||||||
misskeyApi('pages/create', options)
|
os.apiWithDialog('pages/create', options)
|
||||||
.then(created => {
|
.then(created => {
|
||||||
pageId.value = created.id;
|
pageId.value = created.id;
|
||||||
currentName.value = name.value.trim();
|
currentName.value = name.value.trim();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "misskey-js",
|
"name": "misskey-js",
|
||||||
"version": "2024.5.0-io.5d",
|
"version": "2024.5.0-io.5e",
|
||||||
"description": "Misskey SDK for JavaScript",
|
"description": "Misskey SDK for JavaScript",
|
||||||
"types": "./built/dts/index.d.ts",
|
"types": "./built/dts/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
Loading…
Reference in a new issue