This commit is contained in:
syuilo 2024-09-20 12:57:15 +09:00
parent 428ed0f5bd
commit e896b08722
6 changed files with 33 additions and 13 deletions

View File

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class ReactionsBuffering1726804538569 {
name = 'ReactionsBuffering1726804538569'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "enableReactionsBuffering" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableReactionsBuffering"`);
}
}

View File

@ -589,18 +589,10 @@ export class MiMeta {
})
public perUserListTimelineCacheMax: number;
// @Column('boolean', {
// default: true,
// })
// public enableReactionsBuffering: boolean;
//
// /**
// * 分
// */
// @Column('integer', {
// default: 180,
// })
// public reactionsBufferingTtl: number;
@Column('boolean', {
default: false,
})
public enableReactionsBuffering: boolean;
@Column('integer', {
default: 0,

View File

@ -377,6 +377,10 @@ export const meta = {
type: 'number',
optional: false, nullable: false,
},
enableReactionsBuffering: {
type: 'boolean',
optional: false, nullable: false,
},
notesPerOneAd: {
type: 'number',
optional: false, nullable: false,
@ -617,6 +621,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,
perUserListTimelineCacheMax: instance.perUserListTimelineCacheMax,
enableReactionsBuffering: instance.enableReactionsBuffering,
notesPerOneAd: instance.notesPerOneAd,
summalyProxy: instance.urlPreviewSummaryProxyUrl,
urlPreviewEnabled: instance.urlPreviewEnabled,

View File

@ -142,6 +142,7 @@ export const paramDef = {
perRemoteUserUserTimelineCacheMax: { type: 'integer' },
perUserHomeTimelineCacheMax: { type: 'integer' },
perUserListTimelineCacheMax: { type: 'integer' },
enableReactionsBuffering: { type: 'boolean' },
notesPerOneAd: { type: 'integer' },
silencedHosts: {
type: 'array',
@ -598,6 +599,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.perUserListTimelineCacheMax = ps.perUserListTimelineCacheMax;
}
if (ps.enableReactionsBuffering !== undefined) {
set.enableReactionsBuffering = ps.enableReactionsBuffering;
}
if (ps.notesPerOneAd !== undefined) {
set.notesPerOneAd = ps.notesPerOneAd;
}

View File

@ -74,7 +74,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkFolder :defaultOpen="true">
<template #icon><i class="ti ti-bolt"></i></template>
<template #label>Misskey® Reactions Buffering Technology (RBT)</template>
<template #label>Misskey® Reactions Buffering Technology (RBT)<span class="_beta">{{ i18n.ts.beta }}</span></template>
<template v-if="enableReactionsBuffering" #suffix>Enabled</template>
<template v-else #suffix>Disabled</template>

View File

@ -5125,6 +5125,7 @@ export type operations = {
perRemoteUserUserTimelineCacheMax: number;
perUserHomeTimelineCacheMax: number;
perUserListTimelineCacheMax: number;
enableReactionsBuffering: boolean;
notesPerOneAd: number;
backgroundImageUrl: string | null;
deeplAuthKey: string | null;
@ -9395,6 +9396,7 @@ export type operations = {
perRemoteUserUserTimelineCacheMax?: number;
perUserHomeTimelineCacheMax?: number;
perUserListTimelineCacheMax?: number;
enableReactionsBuffering?: boolean;
notesPerOneAd?: number;
silencedHosts?: string[] | null;
mediaSilencedHosts?: string[] | null;