Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Productionビルドで通報の即時解決の一覧が見えない問題を修正 #129

Merged
merged 1 commit into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ export class ReportAbuseProcessorService {
const isReportContentPatternMatched = resolver.reportContentPattern ? new RE2(resolver.reportContentPattern).test(job.data.comment) : true;

if (isTargetUserPatternMatched && isReporterPatternMatched && isReportContentPatternMatched) {
if (resolver.forward && job.data.targetUserHost !== null) {
if (resolver.forward && job.data.targetUserHost !== null && job.data.reporterHost === null) {
this.queueService.deliver(actor, this.apRendererService.addContext(this.apRendererService.renderFlag(actor, targetUser.uri!, job.data.comment)), targetUser.inbox, false);
}

await this.abuseUserReportsRepository.update(job.data.id, {
resolved: true,
assigneeId: actor.id,
forwarded: resolver.forward && job.data.targetUserHost !== null,
forwarded: resolver.forward && job.data.targetUserHost !== null && job.data.reporterHost === null,
});

return;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/abuses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<MkAbuseReportResolver v-model="editingResolver" :data="(resolver as any)" :editable="editableResolver === resolver.id">
<template #button>
<div v-if="editableResolver !== resolver.id">
<MkButton primary inline :class="$style['button-margin']" @click="edit(resolver.id)"><i class="ti ti-pencil"></i> {{ i18n.ts.edit }}</MkButton>
<MkButton primary inline :class="$style.button-margin" @click="edit(resolver.id)"><i class="ti ti-pencil"></i> {{ i18n.ts.edit }}</MkButton>
<MkButton danger inline @click="deleteResolver(resolver.id)"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
</div>
<div v-else>
Expand Down