Skip to content

Commit c06d084

Browse files
committed
Merge tag '2024.5.0-io.5e' into bun
2 parents f0c6330 + 7f3b3cf commit c06d084

18 files changed

+25
-30
lines changed

.devcontainer/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
DFLY_snapshot_cron: '* * * * *'
2525
DFLY_version_check: false
2626
DFLY_tcp_backlog: 2048
27-
DFLY_lock_on_hashtags: true
27+
DFLY_default_lua_flags: allow-undeclared-keys
2828
DFLY_pipeline_squash: 0
2929
DFLY_multi_exec_squash: false
3030
DFLY_conn_io_threads: 4

.github/workflows/test-backend.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
env:
4141
DFLY_version_check: false
4242
DFLY_tcp_backlog: 2048
43-
DFLY_lock_on_hashtags: true
43+
DFLY_default_lua_flags: allow-undeclared-keys
4444
DFLY_pipeline_squash: 0
4545
DFLY_multi_exec_squash: false
4646
DFLY_conn_io_threads: 4
@@ -106,7 +106,7 @@ jobs:
106106
env:
107107
DFLY_version_check: false
108108
DFLY_tcp_backlog: 2048
109-
DFLY_lock_on_hashtags: true
109+
DFLY_default_lua_flags: allow-undeclared-keys
110110
DFLY_pipeline_squash: 0
111111
DFLY_multi_exec_squash: false
112112
DFLY_conn_io_threads: 4

chart/templates/Deployment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ spec:
4444
value: false
4545
- name: DFLY_tcp_backlog
4646
value: 2048
47-
- name: DFLY_lock_on_hashtags
48-
value: true
47+
- name: DFLY_default_lua_flags
48+
value: allow-undeclared-keys
4949
- name: DFLY_pipeline_squash
5050
value: 0
5151
- name: DFLY_multi_exec_squash

docker-compose.local-db.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
DFLY_snapshot_cron: '* * * * *'
1313
DFLY_version_check: false
1414
DFLY_tcp_backlog: 2048
15-
DFLY_lock_on_hashtags: true
15+
DFLY_default_lua_flags: allow-undeclared-keys
1616
DFLY_pipeline_squash: 0
1717
DFLY_multi_exec_squash: false
1818
DFLY_conn_io_threads: 4

docker-compose_example.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
DFLY_snapshot_cron: '* * * * *'
3333
DFLY_version_check: false
3434
DFLY_tcp_backlog: 2048
35-
DFLY_lock_on_hashtags: true
35+
DFLY_default_lua_flags: allow-undeclared-keys
3636
DFLY_pipeline_squash: 0
3737
DFLY_multi_exec_squash: false
3838
DFLY_conn_io_threads: 4

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "misskey",
3-
"version": "2024.5.0-io.5d",
3+
"version": "2024.5.0-io.5e",
44
"codename": "nasubi",
55
"repository": {
66
"type": "git",

packages/backend/src/core/AccountMoveService.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,8 @@ export class AccountMoveService {
274274

275275
if (!srcprofile || !dstprofile) return;
276276

277-
await this.userProfilesRepository.update({ userId: dst.id }, {
278-
moderationNote: srcprofile.moderationNote + '\n' + dstprofile.moderationNote,
279-
});
280-
281-
await this.userProfilesRepository.update({ userId: src.id }, {
282-
moderationNote: srcprofile.moderationNote + '\n' + dstprofile.moderationNote,
277+
await this.userProfilesRepository.update({ userId: In([src.id, dst.id]) }, {
278+
moderationNote: (srcprofile.moderationNote + '\n' + dstprofile.moderationNote).trim(),
283279
});
284280
}
285281

packages/backend/src/core/UtilityService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class UtilityService {
3535

3636
@bindThis
3737
public isUriLocal(uri: string): boolean {
38-
return this.normalizeHost(this.config.hostname) === this.extractHost(uri);
38+
return this.normalizeHost(this.config.host) === this.extractHost(uri);
3939
}
4040

4141
@bindThis

packages/backend/src/server/ActivityPubServerService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ export class ActivityPubServerService {
524524
},
525525
deriveConstraint(request: IncomingMessage) {
526526
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
527-
const isAp = typeof accepted === 'string' && !accepted.match(/html/);
528-
return isAp ? 'ap' : 'html';
527+
if (accepted === false) return null;
528+
return accepted !== 'html' ? 'ap' : 'html';
529529
},
530530
});
531531

packages/backend/src/server/api/endpoints/pages/create.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const paramDef = {
5252
type: 'object',
5353
properties: {
5454
title: { type: 'string' },
55-
name: { type: 'string', minLength: 1 },
55+
name: { type: 'string', minLength: 1, pattern: /^[a-zA-Z0-9_-]+$/.toString().slice(1, -1) },
5656
summary: { type: 'string', nullable: true },
5757
content: { type: 'array', items: {
5858
type: 'object', additionalProperties: true,

packages/backend/src/server/api/endpoints/pages/update.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const paramDef = {
5757
properties: {
5858
pageId: { type: 'string', format: 'misskey:id' },
5959
title: { type: 'string' },
60-
name: { type: 'string', minLength: 1 },
60+
name: { type: 'string', minLength: 1, pattern: /^[a-zA-Z0-9_-]+$/.toString().slice(1, -1) },
6161
summary: { type: 'string', nullable: true },
6262
content: { type: 'array', items: {
6363
type: 'object', additionalProperties: true,

packages/backend/src/server/web/ClientServerService.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ export class ClientServerService {
534534

535535
vary(reply.raw, 'Accept');
536536

537-
if (user != null) {
537+
if (user) {
538538
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
539539
const meta = await this.metaService.fetch();
540540
const me = profile.fields
@@ -564,11 +564,10 @@ export class ClientServerService {
564564
fastify.get<{ Params: { user: string; } }>('/users/:user', async (request, reply) => {
565565
const user = await this.usersRepository.findOneBy({
566566
id: request.params.user,
567-
host: IsNull(),
568567
isSuspended: false,
569568
});
570569

571-
if (user == null) {
570+
if (!user || (user.isDeleted && user.isSuspended)) {
572571
reply.code(404);
573572
return;
574573
}

packages/backend/test/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
environment:
99
DFLY_version_check: false
1010
DFLY_tcp_backlog: 2048
11-
DFLY_lock_on_hashtags: true
11+
DFLY_default_lua_flags: allow-undeclared-keys
1212
DFLY_pipeline_squash: 0
1313
DFLY_multi_exec_squash: false
1414
DFLY_conn_io_threads: 4

packages/frontend/src/pages/admin-user.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ async function assignRole() {
506506
const { canceled: canceled3, result: memo } = await os.inputText({
507507
title: i18n.ts.addMemo,
508508
type: 'textarea',
509-
placeholder: i18n.ts.memo,
509+
default: '',
510510
});
511511
if (canceled3) return;
512512

packages/frontend/src/pages/admin/roles.role.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async function assign() {
146146
const { canceled: canceled3, result: memo } = await os.inputText({
147147
title: i18n.ts.addMemo,
148148
type: 'textarea',
149-
placeholder: i18n.ts.memo,
149+
default: '',
150150
});
151151
if (canceled3) return;
152152

packages/frontend/src/pages/page-editor/page-editor.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
2424
<template #label>{{ i18n.ts._pages.summary }}</template>
2525
</MkInput>
2626

27-
<MkInput v-model="name">
27+
<MkInput v-model="name" type="text" pattern="^[a-zA-Z0-9_-]+$" autocapitalize="off">
2828
<template #prefix>{{ url }}/@{{ author.username }}/pages/</template>
2929
<template #label>{{ i18n.ts._pages.url }}</template>
3030
</MkInput>
@@ -158,7 +158,7 @@ function save() {
158158

159159
if (pageId.value) {
160160
options.pageId = pageId.value;
161-
misskeyApi('pages/update', options)
161+
os.apiWithDialog('pages/update', options)
162162
.then(page => {
163163
currentName.value = name.value.trim();
164164
os.alert({
@@ -167,7 +167,7 @@ function save() {
167167
});
168168
}).catch(onError);
169169
} else {
170-
misskeyApi('pages/create', options)
170+
os.apiWithDialog('pages/create', options)
171171
.then(created => {
172172
pageId.value = created.id;
173173
currentName.value = name.value.trim();

packages/frontend/src/store.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export const defaultStore = markRaw(new Storage('base', {
417417
},
418418
defaultWithReplies: {
419419
where: 'account',
420-
default: false,
420+
default: true,
421421
},
422422
disableStreamingTimeline: {
423423
where: 'device',

packages/misskey-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"type": "module",
33
"name": "misskey-js",
4-
"version": "2024.5.0-io.5d",
4+
"version": "2024.5.0-io.5e",
55
"description": "Misskey SDK for JavaScript",
66
"types": "./built/dts/index.d.ts",
77
"exports": {

0 commit comments

Comments
 (0)