LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.19k stars 873 forks source link

Incoming Undo from federation doesn't work with link #2106

Open vpzomtrrfrt opened 2 years ago

vpzomtrrfrt commented 2 years ago

Issue Summary

Lemmy doesn't appear to accept Undo activities with links as object.

Example object from lotide:

{
  "actor": "http://ltthostname.local:3334/apub/users/3",
  "object": "http://ltthostname.local:3334/apub/communities/5/followers/3",
  "to": "http://localhost:8536/c/hmm",
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "http://ltthostname.local:3334/apub/community_follow_undos/cd6a8d03-9af3-4837-ad21-c3ba0552ff48",
  "type": "Undo"
}

Steps to Reproduce

  1. Follow a Lemmy community from lotide
  2. Unfollow the community
  3. The undo fails to federate, and the Lemmy instance continues to send posts from the community

Technical details

Nutomic commented 2 years ago

Right, have to use IdOrNestedObject for that as well (and probably in many other places). Probably easiest if it has methods as_id() and as_object(), to avoid major changes to the code.

IsaacSchemm commented 10 months ago

This can also be reproduced by following and then unfollowing a community from microblog.pub.