A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
test(api): drop enforcement notice snapshots and trim cases
Hampus03db4ec5ccc8
diff --git a/fluxer_api/src/api/enforcement/tests/EnforcementEvidence.test.ts b/fluxer_api/src/api/enforcement/tests/EnforcementEvidence.test.tsindex 03510bcd6..5936d1ec9 100644--- a/fluxer_api/src/api/enforcement/tests/EnforcementEvidence.test.ts+++ b/fluxer_api/src/api/enforcement/tests/EnforcementEvidence.test.ts@@ -1,25 +1,15 @@// SPDX-License-Identifier: AGPL-3.0-or-later-import fs from 'node:fs';-import path from 'node:path';-import {fileURLToPath} from 'node:url';import type {TestAccount} from '@app/api/auth/tests/AuthTestUtils';import {loadFixture, sendMessageWithAttachments} from '@app/api/channel/tests/AttachmentTestUtils';import {setupTestGuildWithMembers} from '@app/api/channel/tests/ChannelTestUtils';import {EnforcementDecisionRepository} from '@app/api/enforcement/EnforcementDecisionRepository';import {createStaff, decisionBody, getDecision, suspend} from '@app/api/enforcement/tests/EnforcementTestUtils';-import {EnforcementDecisionEvidence, EnforcementDecisionNotes} from '@app/api/Tables';import {type ApiTestHarness, createApiTestHarness} from '@app/api/test/ApiTestHarness';import {AdminACLs} from '@fluxer/constants/src/AdminACLs';import {DeletionReasons} from '@fluxer/constants/src/Core';-import {seconds} from 'itty-time';import {afterAll, beforeAll, beforeEach, describe, expect, test} from 'vitest';-const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../..');-const SCHEMA = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'tools/dev/cassandra_target_schema.json'), 'utf8')) as {- tables: Array<{name: string; options: string}>;-};-describe('Enforcement evidence', () => {let harness: ApiTestHarness;let staff: TestAccount;@@ -123,14 +113,4 @@ describe('Enforcement evidence', () => {]);expect(decision.report_ids).toEqual([]);});-- test('evidence and notes expire after a year', () => {- const year = seconds('365 days');- for (const table of [EnforcementDecisionEvidence, EnforcementDecisionNotes]) {- expect(table.defaultTtlSeconds).toBe(year);- expect(SCHEMA.tables.find((entry) => entry.name === table.name)?.options).toContain(- `default_time_to_live = ${year}`,- );- }- });});diff --git a/fluxer_api/src/api/enforcement/tests/EnforcementNotice.test.ts b/fluxer_api/src/api/enforcement/tests/EnforcementNotice.test.tsindex 26ca8c806..7855468db 100644--- a/fluxer_api/src/api/enforcement/tests/EnforcementNotice.test.ts+++ b/fluxer_api/src/api/enforcement/tests/EnforcementNotice.test.ts@@ -3,7 +3,6 @@import type {UserID} from '@app/api/BrandedTypes';import {getConfig} from '@app/api/Config';import {CONTENT_I18N_MESSAGES} from '@app/api/content_i18n/ContentI18nMessages';-import {joinLocalizedList} from '@app/api/content_i18n/JoinLocalizedList';import type {EnforcementDecisionRow} from '@app/api/database/types/EnforcementTypes';import {EMPTY_USER_ROW} from '@app/api/database/types/UserTypes';import {buildEnforcementNotice, type EvidenceMessageLocation} from '@app/api/enforcement/EnforcementNotice';@@ -11,12 +10,12 @@ import {renderNoticeText} from '@app/api/enforcement/EnforcementNoticeDelivery';import {resolveContactEmails} from '@app/api/instance/ContactEmails';import {getInstanceProductName, setCachedProductName} from '@app/api/instance/ProductName';import {User} from '@app/api/models/User';-import {systemDmBody} from '@app/api/user/services/SystemDmMessage';import {DeletionReasons} from '@fluxer/constants/src/Core';-import {ENFORCEMENT_RULES, type EnforcementRuleKey, isAccountKind} from '@fluxer/constants/src/EnforcementReasons';+import {ENFORCEMENT_RULES, type EnforcementRuleKey} from '@fluxer/constants/src/EnforcementReasons';import {UserFlags} from '@fluxer/constants/src/UserConstants';import {AdminUserClearFieldsRequest} from '@fluxer/schema/src/domains/admin/AdminUserSchemas';import type {EnforcementNotice} from '@fluxer/schema/src/domains/auth/EnforcementNoticeSchemas';+import {enforcementEndedSlots, renderEmailTemplateText, reportResolvedSlots} from '@pkgs/email/src/EmailService';import {getEmailTemplate} from '@pkgs/email/src/email_i18n/EmailI18n';import {afterEach, describe, expect, it} from 'vitest';@@ -157,11 +156,6 @@ describe('buildEnforcementNotice', () => {setCachedProductName(null);});- it.each(Object.entries(KINDS))('renders %s', (_name, row) => {- const evidence = row.reason_code === DeletionReasons.HARASSMENT_OR_BULLYING ? IN_DIRECT_MESSAGE : IN_CHANNEL;- expect(notice(row, evidence)).toMatchSnapshot();- });-it('renders conversations with dates under standard handling and the month only under protected handling', () => {expect(notice(decision(), IN_DIRECT_MESSAGE).facts.slice(1)).toEqual(['1 message in a direct message conversation, on Sep 3, 2026, 8:15 AM UTC.',@@ -176,38 +170,6 @@ describe('buildEnforcementNotice', () => {]);});- it('states how the case reached the team from the decision source, whatever the handling', () => {- for (const row of [decision(), KINDS.protected_harassment!, KINDS.restricted_child_safety!]) {- expect(notice({...row, source: 'report'}, IN_DIRECT_MESSAGE).how_we_decided[0]).toBe(- 'We reviewed this after a report.',- );- expect(notice({...row, source: 'own_review'}, IN_DIRECT_MESSAGE).how_we_decided[0]).toBe(- 'We found this in our own review.',- );- }- });-- it('describes a bot by its own lead, not the rule lead about a person', () => {- const bot = notice(KINDS.bot_suspension!);- expect(bot.facts[0]).toBe('We found activity from your bot that breaks this rule.');- expect(bot.facts.join(' ')).not.toMatch(/\byour account\b|\byou sent\b/);- });-- it('times carry the UTC suffix in one format', () => {- const rendered = JSON.stringify(Object.values(KINDS).map((row) => notice(row)));- expect(rendered).not.toContain('(UTC)');- });-- it('gives messages sent within the same minute one time instead of a range', () => {- const sameMinute: Array<EvidenceMessageLocation> = [- {...IN_CHANNEL[0]!, timestamp: new Date('2026-10-01T09:00:05.000Z')},- {...IN_CHANNEL[0]!, timestamp: new Date('2026-10-01T09:00:40.000Z')},- ];- expect(notice(decision(), sameMinute).facts[1]).toBe(- '2 messages in #general of Plant Club, on Oct 1, 2026, 9:00 AM UTC.',- );- });-it('gives restricted decisions the rule lead only', () => {const restricted = notice(decision({reason_code: DeletionReasons.VIOLENT_EXTREMISM, ends_at: null, statement: 'x'}),@@ -278,25 +240,6 @@ describe('buildEnforcementNotice', () => {});});- it('offers the appeal variants', () => {- expect(notice(decision()).appeal).toEqual({- email: '[email protected]',- deadline: 'Dec 13, 2026',- account_has_email: true,- });- const noEmail = buildEnforcementNotice(- {- type: 'decision',- decision: decision({notice_sent_at: null}),- evidence: [],- networksBlockedUntil: null,- accountHasEmail: false,- },- 'en-US',- );- expect(noEmail.appeal).toEqual({email: '[email protected]', deadline: null, account_has_email: false});- });-it('names no product, address or support line on an unnamed self-hosted instance', () => {config.instance.selfHosted = true;setCachedProductName(null);@@ -317,157 +260,41 @@ describe('buildEnforcementNotice', () => {setCachedProductName(null);const productName = getInstanceProductName();const contacts = resolveContactEmails();+ const full = <T extends Parameters<typeof getEmailTemplate>[0]>(+ key: T,+ variables: Parameters<typeof getEmailTemplate<T>>[2],+ slots?: Parameters<typeof renderEmailTemplateText<T>>[4],+ ) => {+ const template = getEmailTemplate(key, 'en-US', {...variables, reply: 'no'}, productName);+ const text = renderEmailTemplateText(key, 'en-US', variables, productName, slots);+ return template.ok && text !== null ? `${template.value.subject}\n${text}` : null;+ };const rendered = [- ...Object.values(KINDS).map((row) => renderNoticeText(row, notice(row), 'holder', 'en-US')),+ ...Object.values(KINDS).map((row) => renderNoticeText(row, notice(row), 'en-US')),...(['lifted', 'reversed'] as const).map((outcome) =>- getEmailTemplate(+ full('enforcement_ended',- 'en-US',- {- username: 'holder',- outcome,- decision_id: '1',- restores_access: 'yes',- statement: null,- content_removed: 'yes',- },- productName,+ {outcome, decision_id: '1', restores_access: 'yes', statement: null, content_removed: 'yes'},+ enforcementEndedSlots,),),- getEmailTemplate(- 'account_deletion_scheduled_requested',- 'en-US',- {username: 'holder', deletion_date: 'Dec 13, 2026', safety_email: contacts.safetyEmail},- productName,- ),- getEmailTemplate(- 'account_deletion_scheduled_inactivity',- 'en-US',- {username: 'holder', deletion_date: 'Dec 13, 2026', support_email: contacts.supportEmail},- productName,- ),+ full('account_deletion_scheduled_requested', {deletion_date: 'Dec 13, 2026'}),+ full('account_deletion_scheduled_inactivity', {deletion_date: 'Dec 13, 2026'}),...(['removed', 'restricted', 'action_taken', 'no_violation'] as const).flatMap((outcome) => [- getEmailTemplate(- 'report_resolved',- 'en-US',- {- username: 'reporter',- reportId: '1',- publicComment: '',- hasComment: 'no',- outcome,- appeals_email: contacts.appealsEmail,- },- productName,+ full('report_resolved', {outcome, appeals_email: contacts.appealsEmail}, (template) =>+ reportResolvedSlots(template, '1', ''),),- getEmailTemplate(- 'dsa_report_resolved',- 'en-US',- {reportId: '1', publicComment: '', hasComment: 'no', outcome, appeals_email: contacts.appealsEmail},- productName,+ full('dsa_report_resolved', {outcome, appeals_email: contacts.appealsEmail}, (template) =>+ reportResolvedSlots(template, '1', ''),),]),];- for (const entry of rendered) {- const text = typeof entry === 'string' ? entry : entry?.ok ? `${entry.value.subject}\n${entry.value.body}` : null;+ for (const text of rendered) {expect(text).not.toBeNull();expect(text).not.toMatch(/fluxer/i);expect(text).not.toContain('@');}});-- it('states the territorial scope in every notice, email and system message', () => {- const expectScope = (productName: string) => {- const line = `This decision applies everywhere ${productName} is available.`;- for (const row of Object.values(KINDS)) {- const rendered = notice(row);- const text = renderNoticeText(row, rendered, 'holder', 'en-US');- if (isAccountKind(row.kind)) {- expect(rendered.effects[0]).toMatch(/\banywhere\b/);- expect(rendered.effects).not.toContain(line);- expect(text).toContain(rendered.effects[0]);- } else {- expect(rendered.effects[1]).toBe(line);- expect(text).toContain(`${rendered.effects[0]}\n${line}`);- }- }- const legacy = buildEnforcementNotice(- {type: 'legacy', user: legacyUser({temp_banned_until: null, flags: UserFlags.DISABLED})},- 'en-US',- NOW,- );- expect(legacy.effects).toEqual([`You can't sign in or use ${productName} anywhere.`]);- };- expectScope('Fluxer');- config.instance.selfHosted = true;- setCachedProductName('Plant Chat');- expectScope('Plant Chat');- setCachedProductName(null);- expectScope(getInstanceProductName());- expect(notice(KINDS.community_removal!, IN_CHANNEL, 'de').effects[1]).toBe(- `Diese Entscheidung gilt überall, wo ${getInstanceProductName()} verfügbar ist.`,- );- });-- it('never doubles the full stop after a date that ends in a period', () => {- const hr = notice(KINDS.closure!, IN_CHANNEL, 'hr');- expect(JSON.stringify(hr)).not.toMatch(/[^.]\.\.[^.]/);- const email = getEmailTemplate(- 'account_deletion_scheduled_inactivity',- 'hr',- {username: 'holder', deletion_date: '1. pro 2026.', support_email: null},- 'Fluxer',- );- expect(email.ok && email.value.body).toContain('1. pro 2026.\n');- });-- it('starts a system message with a capital letter after the greeting is dropped', () => {- const rendered = getEmailTemplate(- 'report_resolved',- 'de',- {- username: 'reporter',- reportId: '1',- publicComment: '',- hasComment: 'no',- outcome: 'no_violation',- appeals_email: null,- },- 'Fluxer',- );- expect(rendered.ok && systemDmBody(rendered.value.body)).toMatch(/^Wir haben/);- });-- it('names the deletion date once in a closure', () => {- const closure = notice(KINDS.closure!);- const date = closure.deletion_at ? new Date(closure.deletion_at) : null;- expect(date).not.toBeNull();- const lines = [closure.summary, ...closure.effects].join(' ');- expect(lines.match(/\b20\d\d\b/g)).toHaveLength(1);- });-- it('shows links as Markdown in the system message and as plain text with the address in the email', () => {- const row = KINDS.feature_limit_reports!;- const rendered = notice(row);- const dm = renderNoticeText(row, rendered, 'holder', 'en-US') ?? '';- expect(dm).toContain('[company information page](');- expect(dm).toContain('Rule: [Misuse of reporting](');- expect(dm).toContain('[list of these bodies](https://digital-strategy.ec.europa.eu/');- expect(dm).not.toMatch(/^Hello|The Fluxer team$/m);- expect(rendered.effects[0]).toBe(- `You can't send reports in the app until then. To report illegal content, use the safety route on our [company information page](${getConfig().endpoints.marketing}/company-information).`,- );- });-- it('localizes dates and joins profile fields per locale', () => {- expect(joinLocalizedList(['a', 'b'], 'ja')).toBe('a、b');- expect(joinLocalizedList(['a', 'b'], 'zh-CN')).toBe('a、b');- expect(joinLocalizedList(['a', 'b'], 'zh-TW')).toBe('a、b');- expect(joinLocalizedList(['a', 'b'], 'ar')).toBe('a، b');- expect(joinLocalizedList(['a', 'b'], 'zh-HK')).toBe('a, b');- expect(joinLocalizedList(['a', 'b'], 'en-US')).toBe('a, b');- expect(notice(KINDS.suspension!, IN_CHANNEL, 'sv-SE').summary).toContain('2026');- });});describe('enforcement content catalog', () => {diff --git a/fluxer_api/src/api/enforcement/tests/__snapshots__/EnforcementNotice.test.ts.snap b/fluxer_api/src/api/enforcement/tests/__snapshots__/EnforcementNotice.test.ts.snapdeleted file mode 100644index 6d3c4267e..000000000--- a/fluxer_api/src/api/enforcement/tests/__snapshots__/EnforcementNotice.test.ts.snap+++ /dev/null@@ -1,612 +0,0 @@-// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html--exports[`buildEnforcementNotice > renders bot_suspension 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "The bot can't connect or act anywhere until then. Your own account is not restricted.",- ],- "ends_at": "2026-10-21T10:00:00.000Z",- "facts": [- "We found activity from your bot that breaks this rule.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "suspension",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We suspended your bot helperbot until Oct 21, 2026, 10:00 AM UTC.",-}-`;--exports[`buildEnforcementNotice > renders closure 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": "2026-12-27T10:00:00.000Z",- "effects": [- "You can't sign in or use Fluxer anywhere. We'll delete the account and its data on Dec 27, 2026, except data we have to keep by law.",- "You may not create or use other accounts.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "closure",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We closed your account.",-}-`;--exports[`buildEnforcementNotice > renders community_removal 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "The community and its channels and messages are no longer available to anyone. Your own account is not restricted.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found content in this community that breaks this rule.",- "2 messages posted in #general, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "community_removal",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We removed your community Plant Club.",-}-`;--exports[`buildEnforcementNotice > renders content_removal 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your account is not otherwise restricted.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "content_removal",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We removed 2 messages you sent.",-}-`;--exports[`buildEnforcementNotice > renders content_removal_all 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your account is not otherwise restricted.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "content_removal",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We removed all messages you sent.",-}-`;--exports[`buildEnforcementNotice > renders copyright 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your account is not restricted. If this happens again, we may limit or suspend it.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found content from your account that uses someone else's work without permission.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- "Rights holder or right concerned: Example Records.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "warning",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Copyright",- "url": "http://localhost:8088/marketing/terms#3-4-copyright",- },- "statement": null,- "summary": "We're warning you about activity on your account.",-}-`;--exports[`buildEnforcementNotice > renders feature_limit_direct_messages 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your one-to-one messages and friend requests are not delivered, and your profile is hidden. In communities and group conversations, people see your messages collapsed and marked as possible spam.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "feature_limit",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We limited a feature on your account.",-}-`;--exports[`buildEnforcementNotice > renders feature_limit_purchases 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "You can't make purchases on Fluxer until a person on our team reviews this.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found a payment issue on your account that breaks our payment terms.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- "A payment on your account on Oct 10, 2026.",- ],- "how_we_decided": [- "We found this in our own review.",- "This is a temporary limit applied automatically while a person on our team reviews it.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "feature_limit",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Payments",- "url": "http://localhost:8088/marketing/terms#4-4-failed-payments-and-disputes",- },- "statement": null,- "summary": "We limited a feature on your account.",-}-`;--exports[`buildEnforcementNotice > renders feature_limit_reports 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "You can't send reports in the app until then. To report illegal content, use the safety route on our [company information page](http://localhost:8088/marketing/company-information).",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": "2026-10-21T10:00:00.000Z",- "facts": [- "We found that your account repeatedly sent reports that were false or made in bad faith.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "feature_limit",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Misuse of reporting",- "url": "http://localhost:8088/marketing/guidelines#8-reporting",- },- "statement": null,- "summary": "We limited a feature on your account until Oct 21, 2026, 10:00 AM UTC.",-}-`;--exports[`buildEnforcementNotice > renders permanent_suspension 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "You can't sign in or use Fluxer anywhere.",- "You may not create or use other accounts.",- "We also removed 3 messages.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "suspension",- "permanent": true,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We banned your account.",-}-`;--exports[`buildEnforcementNotice > renders profile_reset 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your account is not otherwise restricted.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- "Your profile: bio, display name.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "profile_reset",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We reset parts of your profile: bio, display name.",-}-`;--exports[`buildEnforcementNotice > renders protected_harassment 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "You can't sign in or use Fluxer anywhere until then. Your account, messages and communities are kept.",- ],- "ends_at": "2026-10-21T10:00:00.000Z",- "facts": [- "We found messages from your account that harassed or bullied someone.",- "1 message in a direct message conversation in September 2026.",- "1 message in a group conversation in September 2026.",- "1 message in a conversation that no longer exists, on Sep 5, 2026, 8:15 AM UTC.",- ],- "how_we_decided": [- "We reviewed this after a report.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "suspension",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Harassment",- "url": "http://localhost:8088/marketing/guidelines#1-harassment-threats-and-privacy",- },- "statement": null,- "summary": "We suspended your account until Oct 21, 2026, 10:00 AM UTC.",-}-`;--exports[`buildEnforcementNotice > renders restricted_child_safety 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "You can't sign in or use Fluxer anywhere.",- "You may not create or use other accounts.",- ],- "ends_at": null,- "facts": [- "We found content or activity on your account that breaks our rules on protecting children.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "suspension",- "permanent": true,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Child safety",- "url": "http://localhost:8088/marketing/guidelines#4-sexual-content-and-protection-of-minors",- },- "statement": null,- "summary": "We banned your account.",-}-`;--exports[`buildEnforcementNotice > renders self_harm 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your account is not restricted. If this happens again, we may limit or suspend it.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found content from your account that encourages or gives instructions for self-harm.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- "If you're going through a hard time, you don't have to deal with it alone. [Section 3 of our community guidelines](http://localhost:8088/marketing/guidelines#3-violence-extremism-and-self-harm) lists support lines.",- ],- "how_we_decided": [- "We found this in our own review.",- "Automated tools flagged this. A person on our team reviewed it and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "warning",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Promoting self-harm",- "url": "http://localhost:8088/marketing/guidelines#3-violence-extremism-and-self-harm",- },- "statement": null,- "summary": "We're warning you about activity on your account.",-}-`;--exports[`buildEnforcementNotice > renders suspension 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "You can't sign in or use Fluxer anywhere until then. Your account, messages and communities are kept.",- ],- "ends_at": "2026-10-21T10:00:00.000Z",- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "suspension",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": "You posted the same link in ten communities.",- "summary": "We suspended your account until Oct 21, 2026, 10:00 AM UTC.",-}-`;--exports[`buildEnforcementNotice > renders warning 1`] = `-{- "appeal": {- "account_has_email": true,- "deadline": "Dec 13, 2026",- "email": "[email protected]",- },- "decision_id": "1234567890123",- "deletion_at": null,- "effects": [- "Your account is not restricted. If this happens again, we may limit or suspend it.",- "This decision applies everywhere Fluxer is available.",- ],- "ends_at": null,- "facts": [- "We found that your account sent unwanted messages in bulk.",- "2 messages in #general of Plant Club, between Oct 1, 2026, 9:00 AM UTC and Oct 2, 2026, 6:30 PM UTC.",- ],- "how_we_decided": [- "We found this in our own review.",- "A person on our team reviewed this and made the decision.",- ],- "issued_at": "2026-10-14T10:00:00.000Z",- "kind": "warning",- "permanent": false,- "redress": [- "If you're in the EU, you can also refer this decision to a certified out-of-court dispute settlement body. The European Commission keeps a [list of these bodies](https://digital-strategy.ec.europa.eu/en/policies/dsa-out-court-dispute-settlement).",- "You can also complain to the Digital Services Coordinator in your EU country, or go to court.",- ],- "rule": {- "title": "Spam",- "url": "http://localhost:8088/marketing/guidelines#6-spam-and-service-abuse",- },- "statement": null,- "summary": "We're warning you about activity on your account.",-}-`;