Compare commits
No commits in common. "e9fc4e4828fc68262612137510e7f3293210e597" and "a7aba8a19a164d467c6a8c31a43359a76874a4ba" have entirely different histories.
e9fc4e4828
...
a7aba8a19a
|
@ -1097,9 +1097,6 @@ export interface Locale {
|
|||
"doYouAgree": string;
|
||||
"beSureToReadThisAsItIsImportant": string;
|
||||
"iHaveReadXCarefullyAndAgree": string;
|
||||
"doNotSendNotificationEmailsForAbuseReport": string;
|
||||
"emailToReceiveAbuseReport": string;
|
||||
"emailToReceiveAbuseReportCaption": string;
|
||||
"_initialAccountSetting": {
|
||||
"accountCreated": string;
|
||||
"letsStartAccountSetup": string;
|
||||
|
|
|
@ -1094,9 +1094,6 @@ expired: "期限切れ"
|
|||
doYouAgree: "同意しますか?"
|
||||
beSureToReadThisAsItIsImportant: "重要ですので必ずお読みください。"
|
||||
iHaveReadXCarefullyAndAgree: "「{x}」の内容をよく読み、同意します。"
|
||||
doNotSendNotificationEmailsForAbuseReport: "通報の通知メールを発送しないようにする"
|
||||
emailToReceiveAbuseReport: "通報通知を受け取るためのメールアドレス"
|
||||
emailToReceiveAbuseReportCaption: "通報通知を受け取るためのメールアドレスを指定します。ここの入力欄を空にするとメールサーバーのメールアドレスが使用されます。"
|
||||
|
||||
_initialAccountSetting:
|
||||
accountCreated: "アカウントの作成が完了しました!"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
export class NotificationEmailsForAbuseReport1691120548582 {
|
||||
name = 'NotificationEmailsForAbuseReport1691120548582'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "emailToReceiveAbuseReport" character varying(1024)`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "doNotSendNotificationEmailsForAbuseReport" boolean NOT NULL DEFAULT false`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "doNotSendNotificationEmailsForAbuseReport"`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "emailToReceiveAbuseReport"`);
|
||||
}
|
||||
}
|
|
@ -41,11 +41,6 @@ export class Meta {
|
|||
})
|
||||
public maintainerEmail: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: true,
|
||||
})
|
||||
public emailToReceiveAbuseReport: string | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
|
@ -437,11 +432,6 @@ export class Meta {
|
|||
})
|
||||
public enableIdenticonGeneration: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
public doNotSendNotificationEmailsForAbuseReport: boolean;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: { },
|
||||
})
|
||||
|
|
|
@ -104,8 +104,8 @@ export class ReportAbuseProcessorService {
|
|||
}
|
||||
|
||||
const meta = await this.metaService.fetch();
|
||||
if ((meta.emailToReceiveAbuseReport || meta.email) && !meta.doNotSendNotificationEmailsForAbuseReport) {
|
||||
this.emailService.sendEmail(meta.emailToReceiveAbuseReport ?? meta.email!, 'New abuse report',
|
||||
if (meta.email) {
|
||||
this.emailService.sendEmail(meta.email, 'New abuse report',
|
||||
sanitizeHtml(job.data.comment),
|
||||
sanitizeHtml(job.data.comment));
|
||||
}
|
||||
|
|
|
@ -278,14 +278,6 @@ export const meta = {
|
|||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
doNotSendNotificationEmailsForAbuseReport: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
emailToReceiveAbuseReport: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
policies: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
|
@ -391,8 +383,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
enableChartsForFederatedInstances: instance.enableChartsForFederatedInstances,
|
||||
enableServerMachineStats: instance.enableServerMachineStats,
|
||||
enableIdenticonGeneration: instance.enableIdenticonGeneration,
|
||||
doNotSendNotificationEmailsForAbuseReport: instance.doNotSendNotificationEmailsForAbuseReport,
|
||||
emailToReceiveAbuseReport: instance.emailToReceiveAbuseReport,
|
||||
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||
};
|
||||
});
|
||||
|
|
|
@ -104,8 +104,6 @@ export const paramDef = {
|
|||
enableChartsForFederatedInstances: { type: 'boolean' },
|
||||
enableServerMachineStats: { type: 'boolean' },
|
||||
enableIdenticonGeneration: { type: 'boolean' },
|
||||
doNotSendNotificationEmailsForAbuseReport: { type: 'boolean' },
|
||||
emailToReceiveAbuseReport: { type: 'string', nullable: true },
|
||||
serverRules: { type: 'array', items: { type: 'string' } },
|
||||
preservedUsernames: { type: 'array', items: { type: 'string' } },
|
||||
},
|
||||
|
@ -421,14 +419,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
set.enableIdenticonGeneration = ps.enableIdenticonGeneration;
|
||||
}
|
||||
|
||||
if (ps.doNotSendNotificationEmailsForAbuseReport !== undefined) {
|
||||
set.doNotSendNotificationEmailsForAbuseReport = ps.doNotSendNotificationEmailsForAbuseReport;
|
||||
}
|
||||
|
||||
if (ps.emailToReceiveAbuseReport !== undefined) {
|
||||
set.emailToReceiveAbuseReport = ps.emailToReceiveAbuseReport;
|
||||
}
|
||||
|
||||
if (ps.serverRules !== undefined) {
|
||||
set.serverRules = ps.serverRules;
|
||||
}
|
||||
|
|
|
@ -36,12 +36,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
|
||||
<div class="_panel" style="padding: 16px;">
|
||||
<MkSwitch v-model="doNotSendNotificationEmailsForAbuseReport">
|
||||
<template #label>{{ i18n.ts.doNotSendNotificationEmailsForAbuseReport }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
</div>
|
||||
</FormSuspense>
|
||||
</MkSpacer>
|
||||
|
@ -62,7 +56,6 @@ let enableServerMachineStats: boolean = $ref(false);
|
|||
let enableIdenticonGeneration: boolean = $ref(false);
|
||||
let enableChartsForRemoteUser: boolean = $ref(false);
|
||||
let enableChartsForFederatedInstances: boolean = $ref(false);
|
||||
let doNotSendNotificationEmailsForAbuseReport: boolean = $ref(false);
|
||||
|
||||
async function init() {
|
||||
const meta = await os.api('admin/meta');
|
||||
|
@ -70,7 +63,6 @@ async function init() {
|
|||
enableIdenticonGeneration = meta.enableIdenticonGeneration;
|
||||
enableChartsForRemoteUser = meta.enableChartsForRemoteUser;
|
||||
enableChartsForFederatedInstances = meta.enableChartsForFederatedInstances;
|
||||
doNotSendNotificationEmailsForAbuseReport = meta.doNotSendNotificationEmailsForAbuseReport;
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
@ -79,7 +71,6 @@ function save() {
|
|||
enableIdenticonGeneration,
|
||||
enableChartsForRemoteUser,
|
||||
enableChartsForFederatedInstances,
|
||||
doNotSendNotificationEmailsForAbuseReport,
|
||||
}).then(() => {
|
||||
fetchInstance();
|
||||
});
|
||||
|
|
|
@ -88,18 +88,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkSwitch>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts.abuseReports }}</template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<MkInput v-model="emailToReceiveAbuseReport" type="email">
|
||||
<template #prefix><i class="ti ti-mail"></i></template>
|
||||
<template #label>{{ i18n.ts.emailToReceiveAbuseReport }}</template>
|
||||
<template #caption>{{ i18n.ts.emailToReceiveAbuseReportCaption }}</template>
|
||||
</MkInput>
|
||||
</div>
|
||||
</FormSection>
|
||||
</div>
|
||||
</FormSuspense>
|
||||
</MkSpacer>
|
||||
|
@ -133,7 +121,6 @@ let name: string | null = $ref(null);
|
|||
let description: string | null = $ref(null);
|
||||
let maintainerName: string | null = $ref(null);
|
||||
let maintainerEmail: string | null = $ref(null);
|
||||
let emailToReceiveAbuseReport: string | null = $ref(null);
|
||||
let pinnedUsers: string = $ref('');
|
||||
let cacheRemoteFiles: boolean = $ref(false);
|
||||
let cacheRemoteSensitiveFiles: boolean = $ref(false);
|
||||
|
@ -149,7 +136,6 @@ async function init(): Promise<void> {
|
|||
description = meta.description;
|
||||
maintainerName = meta.maintainerName;
|
||||
maintainerEmail = meta.maintainerEmail;
|
||||
emailToReceiveAbuseReport = meta.emailToReceiveAbuseReport;
|
||||
pinnedUsers = meta.pinnedUsers.join('\n');
|
||||
cacheRemoteFiles = meta.cacheRemoteFiles;
|
||||
cacheRemoteSensitiveFiles = meta.cacheRemoteSensitiveFiles;
|
||||
|
@ -166,8 +152,6 @@ function save(): void {
|
|||
description,
|
||||
maintainerName,
|
||||
maintainerEmail,
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
emailToReceiveAbuseReport: emailToReceiveAbuseReport || null,
|
||||
pinnedUsers: pinnedUsers.split('\n'),
|
||||
cacheRemoteFiles,
|
||||
cacheRemoteSensitiveFiles,
|
||||
|
|
Loading…
Reference in New Issue