Changeset 1c2dcba in Klonkt for test/activitypub-as2.test.js


Ignore:
Timestamp:
07/01/2026 07:14:12 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
737ea05
Parents:
0688b5f
Message:

feat(fediverse): report a post/account to its home server (AS2 Flag)

From the interact page you can now report a fediverse post to its home server's
moderators. Sends the Mastodon-standard AS2 Flag (object = [reported account,
reported status], content = the reason) to the reported account's inbox.

  • src/services/ActivityPubService.js — sendReport(site, {objectUri, actorUri, reason}) resolves the reported account, builds the Flag and delivers it to their inbox.
  • src/routes/posts.js — POST /authorize_interaction/report (owner-only); GET passes reported and skips re-resolving on the confirmation view.
  • src/views/pages/authorize-interaction.ejs — a "Report this post" disclosure with a reason field, a "reported" confirmation, and scoped styles.
  • src/services/i18n.js — fedi.report_* + fedi.reported_* (nl/en/de).
  • test/activitypub-as2.test.js — allow the AS2 Flag activity type.
  • CHANGELOG(.nl/.de).md — "Report a post to the fediverse" under Unreleased.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/activitypub-as2.test.js

    r0688b5f r1c2dcba  
    3232  'publicKey', 'owner', 'publicKeyPem',
    3333  'Note', 'Person', 'Create', 'Update', 'Delete', 'Tombstone', 'Announce', 'Like', 'Follow',
    34   'Accept', 'Reject', 'Undo', 'Add', 'Remove', 'Document', 'Image', 'Audio', 'Video',
     34  'Accept', 'Reject', 'Undo', 'Add', 'Remove', 'Flag', 'Document', 'Image', 'Audio', 'Video',
    3535  'Mention', 'Link', 'Collection', 'OrderedCollection', 'OrderedCollectionPage',
    3636]);
Note: See TracChangeset for help on using the changeset viewer.