Skip to content

Conversation

@mattwiebe
Copy link
Contributor

@mattwiebe mattwiebe commented Mar 27, 2025

See #1513 especially this comment

According to the Draft Data Portability spec, section 4.1:

The user sends a Move activity from the old actor to all followers.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Move",
  "actor": "https://old.example/users/username",
  "object": "https://old.example/users/username",
  "target": "https://new.example/users/username"
}

Proposed changes:

  • Set object to the $from param rather than the $to param in Move::internally

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

The testing is performed in the tests. You can manually call Move::internally yourself to verify if you wish.

Changelog entry

  • Automatically create a changelog entry from the details below.
Use the `$from` account for the object in Move activity for internal Moves

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Use the $from account for the object in Move activity for internal Moves

@mattwiebe mattwiebe requested a review from a team March 27, 2025 22:27
@mattwiebe
Copy link
Contributor Author

I guess we should probably change this in Move::externally as well? Has it been working properly there?

@mattwiebe mattwiebe changed the title Move: use $from for object in Move::internally Move: use $from for object in Move::internally Mar 27, 2025
Copy link
Member

@pfefferle pfefferle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just re-checked the mastodon docs and you are right, object references the source id, not the target! Good find!

@pfefferle
Copy link
Member

And we should definitely also change it for Move::externally!

@obenland obenland merged commit 958c452 into trunk Mar 28, 2025
15 checks passed
@obenland obenland deleted the fix/move-internally branch March 28, 2025 18:12
jsit added a commit to jsit/wordpress-activitypub that referenced this pull request Nov 1, 2025
* tag '5.6.1': (47 commits)
  Release 5.6.1 (Automattic#1542)
  Fix: Use specified time formatting for Outbox Activities (Automattic#1537)
  Fix: Default value for empty `movedTo` field (Automattic#1539)
  Fix: Post Interactions settings (Automattic#1540)
  Release 5.6.0 (Automattic#1534)
  lover significance (Automattic#1533)
  Scheduler: Don't federate Deletes of unfederated posts. (Automattic#1528)
  Move: use `$from` for object in `Move::externally` (Automattic#1531)
  Fix: Properly traverse the object hierarchy to get the ID (Automattic#1518)
  Mentions: Standardize around only displaying username (Automattic#1510)
  Tests: Reduce chance of time offsets (Automattic#1527)
  Import: Don't federate new attachments (Automattic#1526)
  Importer: Format import count number. (Automattic#1525)
  Move: Add a Mastodon importer (Automattic#1502)
  Move: use `$from` for object in `Move::internally` (Automattic#1516)
  Fix: Do not send self-replies (Automattic#1517)
  Fix: Delete Undone comments instead of trashing them (Automattic#1520)
  Dispatcher: Adhere to passed batch size. (Automattic#1514)
  Add interaction settings (Automattic#1395)
  Fix: Set proper default, to show Welcome screen by default (Automattic#1512)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants