Skip to content

Commit

Permalink
Merge tag '2024.5.0-io.5e' into bun
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Jan 7, 2025
2 parents f0c6330 + 7f3b3cf commit c06d084
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_lock_on_hashtags: true
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
env:
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_lock_on_hashtags: true
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
env:
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_lock_on_hashtags: true
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/Deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ spec:
value: false
- name: DFLY_tcp_backlog
value: 2048
- name: DFLY_lock_on_hashtags
value: true
- name: DFLY_default_lua_flags
value: allow-undeclared-keys
- name: DFLY_pipeline_squash
value: 0
- name: DFLY_multi_exec_squash
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.local-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_lock_on_hashtags: true
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
Expand Down
2 changes: 1 addition & 1 deletion docker-compose_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_lock_on_hashtags: true
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2024.5.0-io.5d",
"version": "2024.5.0-io.5e",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
8 changes: 2 additions & 6 deletions packages/backend/src/core/AccountMoveService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,8 @@ export class AccountMoveService {

if (!srcprofile || !dstprofile) return;

await this.userProfilesRepository.update({ userId: dst.id }, {
moderationNote: srcprofile.moderationNote + '\n' + dstprofile.moderationNote,
});

await this.userProfilesRepository.update({ userId: src.id }, {
moderationNote: srcprofile.moderationNote + '\n' + dstprofile.moderationNote,
await this.userProfilesRepository.update({ userId: In([src.id, dst.id]) }, {
moderationNote: (srcprofile.moderationNote + '\n' + dstprofile.moderationNote).trim(),
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/UtilityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class UtilityService {

@bindThis
public isUriLocal(uri: string): boolean {
return this.normalizeHost(this.config.hostname) === this.extractHost(uri);
return this.normalizeHost(this.config.host) === this.extractHost(uri);
}

@bindThis
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/server/ActivityPubServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ export class ActivityPubServerService {
},
deriveConstraint(request: IncomingMessage) {
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
const isAp = typeof accepted === 'string' && !accepted.match(/html/);
return isAp ? 'ap' : 'html';
if (accepted === false) return null;
return accepted !== 'html' ? 'ap' : 'html';
},
});

Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/pages/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const paramDef = {
type: 'object',
properties: {
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 },
content: { type: 'array', items: {
type: 'object', additionalProperties: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/pages/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const paramDef = {
properties: {
pageId: { type: 'string', format: 'misskey:id' },
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 },
content: { type: 'array', items: {
type: 'object', additionalProperties: true,
Expand Down
5 changes: 2 additions & 3 deletions packages/backend/src/server/web/ClientServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ export class ClientServerService {

vary(reply.raw, 'Accept');

if (user != null) {
if (user) {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
const meta = await this.metaService.fetch();
const me = profile.fields
Expand Down Expand Up @@ -564,11 +564,10 @@ export class ClientServerService {
fastify.get<{ Params: { user: string; } }>('/users/:user', async (request, reply) => {
const user = await this.usersRepository.findOneBy({
id: request.params.user,
host: IsNull(),
isSuspended: false,
});

if (user == null) {
if (!user || (user.isDeleted && user.isSuspended)) {
reply.code(404);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
environment:
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_lock_on_hashtags: true
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin-user.vue
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ async function assignRole() {
const { canceled: canceled3, result: memo } = await os.inputText({
title: i18n.ts.addMemo,
type: 'textarea',
placeholder: i18n.ts.memo,
default: '',
});
if (canceled3) return;

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/roles.role.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async function assign() {
const { canceled: canceled3, result: memo } = await os.inputText({
title: i18n.ts.addMemo,
type: 'textarea',
placeholder: i18n.ts.memo,
default: '',
});
if (canceled3) return;

Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/pages/page-editor/page-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts._pages.summary }}</template>
</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 #label>{{ i18n.ts._pages.url }}</template>
</MkInput>
Expand Down Expand Up @@ -158,7 +158,7 @@ function save() {

if (pageId.value) {
options.pageId = pageId.value;
misskeyApi('pages/update', options)
os.apiWithDialog('pages/update', options)
.then(page => {
currentName.value = name.value.trim();
os.alert({
Expand All @@ -167,7 +167,7 @@ function save() {
});
}).catch(onError);
} else {
misskeyApi('pages/create', options)
os.apiWithDialog('pages/create', options)
.then(created => {
pageId.value = created.id;
currentName.value = name.value.trim();
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export const defaultStore = markRaw(new Storage('base', {
},
defaultWithReplies: {
where: 'account',
default: false,
default: true,
},
disableStreamingTimeline: {
where: 'device',
Expand Down
2 changes: 1 addition & 1 deletion packages/misskey-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
"version": "2024.5.0-io.5d",
"version": "2024.5.0-io.5e",
"description": "Misskey SDK for JavaScript",
"types": "./built/dts/index.d.ts",
"exports": {
Expand Down

0 comments on commit c06d084

Please sign in to comment.