Skip to content

Commit 4998aa4

Browse files
authored
Misc moderation flow fixes. (#7964)
1 parent 13d2dba commit 4998aa4

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

app/lib/account/models.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,14 @@ String consentDedupId({
421421
.join('/');
422422

423423
abstract class UserModeratedReason {
424+
static const bot = 'bot';
424425
static const illegalContent = 'illegal-content';
425426
static const policyViolation = 'policy-violation';
426427
static const unfoundedNotifications = 'unfounded-notifications';
427428
static const unfoundedAppeals = 'unfounded-appeals';
428429

429430
static const _values = {
431+
bot,
430432
illegalContent,
431433
policyViolation,
432434
unfoundedNotifications,

app/lib/admin/models.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ abstract class ModerationStatus {
234234
static bool isValidStatus(String value) => _values.contains(value);
235235
static bool wasModerationApplied(String value) =>
236236
value == ModerationStatus.moderationApplied ||
237-
value == ModerationStatus.moderationUpheld ||
238237
value == ModerationStatus.noActionReverted;
239238
}
240239

app/test/admin/moderation_case_resolve_test.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ void main() {
129129

130130
final mc = await _prepare(apply: null, appealCaseId: mc1.caseId);
131131
expect(
132-
await _close(
133-
mc.caseId,
134-
reason: 'The package violated our policy.',
135-
),
132+
await _close(mc.caseId),
136133
'moderation-upheld',
137134
);
138135
});

pkg/pub_integration/test/report_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ void main() {
214214
AdminInvokeActionArguments(
215215
arguments: {
216216
'case': appealCaseId,
217-
'grounds': 'policy',
218-
'violation': 'scope_of_platform_service',
219-
'reason': 'Package violated our policy.',
220217
},
221218
),
222219
);

0 commit comments

Comments
 (0)