Skip to content
Snippets Groups Projects
Commit 80087c11 authored by Kio!'s avatar Kio! 💻
Browse files

Merge branch Sharkey:develop into develop

parents 1e1233fb 9cf40ef4
No related branches found
No related tags found
No related merge requests found
Pipeline #1048 canceled with stage
in 25 minutes and 28 seconds
......@@ -98,9 +98,9 @@ export class AbuseReportService {
const shouldForward = paramsMap.get(report.id)!.forward;
if (shouldForward && report.targetUserHost != null) {
return targetUserMap.set(report.id, await this.usersRepository.findOneByOrFail({ id: report.targetUserId }));
targetUserMap.set(report.id, await this.usersRepository.findOneByOrFail({ id: report.targetUserId }));
} else {
return targetUserMap.set(report.id, null);
targetUserMap.set(report.id, null);
}
}
......
......@@ -37,8 +37,13 @@ export class RateLimiterService {
return Promise.resolve();
}
// those lines with the "wrong" brace style / indentation are
// done that way so that the *other* lines stay identical to
// Misskey, simplifying merges
// Short-term limit
const min = new Promise<void>((ok, reject) => {
// eslint-disable-next-line brace-style
const minP = () => { return new Promise<void>((ok, reject) => {
const minIntervalLimiter = new Limiter({
id: `${actor}:${limitation.key}:min`,
duration: limitation.minInterval! * factor,
......@@ -57,16 +62,18 @@ export class RateLimiterService {
return reject({ code: 'BRIEF_REQUEST_INTERVAL', info });
} else {
if (hasLongTermLimit) {
return max.then(ok, reject);
return maxP().then(ok, reject);
} else {
return ok();
}
}
});
});
// eslint-disable-next-line brace-style
}); };
// Long term limit
const max = new Promise<void>((ok, reject) => {
// eslint-disable-next-line brace-style
const maxP = () => { return new Promise<void>((ok, reject) => {
const limiter = new Limiter({
id: `${actor}:${limitation.key}`,
duration: limitation.duration! * factor,
......@@ -87,7 +94,8 @@ export class RateLimiterService {
return ok();
}
});
});
// eslint-disable-next-line brace-style
}); };
const hasShortTermLimit = typeof limitation.minInterval === 'number';
......@@ -96,9 +104,9 @@ export class RateLimiterService {
typeof limitation.max === 'number';
if (hasShortTermLimit) {
return min;
return minP();
} else if (hasLongTermLimit) {
return max;
return maxP();
} else {
return Promise.resolve();
}
......
......@@ -39,7 +39,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
});
for (const file of files) {
this.driveService.deleteFile(file);
this.driveService.deleteFile(file, false, me);
}
});
}
......
......@@ -119,9 +119,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<img src="https://antani.cyou/proxy/avatar.webp?url=https%3A%2F%2Fantani.cyou%2Ffiles%2Fa2944119-024c-4abd-86e5-64bf0d30b26f&avatar=1" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@lucent</span>
</a>
<a href="https://karilaa.app/@karilaa" target="_blank" :class="$style.contributor">
<img src="https://karilaa.app/proxy/avatar.webp?url=https%3A%2F%2Fkarilaa.app%2Ffiles%2Fc366e6f9-96d8-4d3b-b996-30e0a7cb3c5a&avatar=1" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@karilaa</span>
<a href="https://plasmatrap.com/@privateger" target="_blank" :class="$style.contributor">
<img src="https://mediaproxy.plasmatrap.com/?url=https%3A%2F%2Fplasmatrap.com%2Ffiles%2F2cf35a8f-6520-4d4c-9611-bf22ee983293&avatar=1" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@privateger</span>
</a>
<a href="https://thetransagenda.gay/@phoenix_fairy" target="_blank" :class="$style.contributor">
<img src="https://thetransagenda.gay/proxy/avatar.webp?url=https%3A%2F%2Fs3.us-east-005.backblazeb2.com%2Ftranssharkey%2Fnull%2Fd93ac6dc-2020-4b5a-bce7-84b41e97a0ac.png&avatar=1" :class="$style.contributorAvatar">
......
......@@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer :contentMax="900">
<div :class="$style.root" class="_gaps">
<div :class="$style.subMenus" class="_gaps">
<MkButton link to="/admin/abuse-report-notification-recipient" primary>{{ "通知設定" }}</MkButton>
<MkButton link to="/admin/abuse-report-notification-recipient" primary>{{ i18n.ts.notificationSetting }}</MkButton>
</div>
<div :class="$style.inputs" class="_gaps">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment