(Resolved) Lemmy sends out an Undo of a Dislike as an Undo of a Like

Original dislike:


<span style="color:#323232;">{
</span><span style="color:#323232;">  "actor": "https://lemmy.ml/c/asklemmy",
</span><span style="color:#323232;">  "to": [
</span><span style="color:#323232;">    "https://www.w3.org/ns/activitystreams#Public"
</span><span style="color:#323232;">  ],
</span><span style="color:#323232;">  "object": {
</span><span style="color:#323232;">    "id": "https://endlesstalk.org/activities/dislike/e1f82f6a-d49b-4dab-b444-36c382f13c5a",
</span><span style="color:#323232;">    "actor": "https://endlesstalk.org/u/freamon",
</span><span style="color:#323232;">    "@context": [
</span><span style="color:#323232;">      "https://www.w3.org/ns/activitystreams",
</span><span style="color:#323232;">      "https://w3id.org/security/v1",
</span><span style="color:#323232;">      { ... },
</span><span style="color:#323232;">        ...
</span><span style="color:#323232;">      }
</span><span style="color:#323232;">    ],
</span><span style="color:#323232;">    "object": "https://midwest.social/post/7242862",
</span><span style="color:#323232;">    "type": "Dislike",
</span><span style="color:#323232;">    "audience": "https://lemmy.ml/c/asklemmy"
</span><span style="color:#323232;">  },
</span><span style="color:#323232;">  "cc": [
</span><span style="color:#323232;">    "https://lemmy.ml/c/asklemmy/followers"
</span><span style="color:#323232;">  ],
</span><span style="color:#323232;">  "type": "Announce",
</span><span style="color:#323232;">  "id": "https://lemmy.ml/activities/announce/dislike/6896b8ce-026d-463a-a223-ec1a1d444e5c"
</span><span style="color:#323232;">}
</span>

Undo of Dislike:


<span style="color:#323232;">{
</span><span style="color:#323232;">  "actor": "https://lemmy.ml/c/asklemmy",
</span><span style="color:#323232;">  "to": [
</span><span style="color:#323232;">    "https://www.w3.org/ns/activitystreams#Public"
</span><span style="color:#323232;">  ],
</span><span style="color:#323232;">  "object": {
</span><span style="color:#323232;">    "id": "https://endlesstalk.org/activities/undo/a9377c0b-074c-41de-ba99-51eeca323810",
</span><span style="color:#323232;">    "actor": "https://endlesstalk.org/u/freamon",
</span><span style="color:#323232;">    "@context": [
</span><span style="color:#323232;">      "https://www.w3.org/ns/activitystreams",
</span><span style="color:#323232;">      "https://w3id.org/security/v1",
</span><span style="color:#323232;">      { ... },
</span><span style="color:#323232;">        ...
</span><span style="color:#323232;">      }
</span><span style="color:#323232;">    ],
</span><span style="color:#323232;">    "object": {
</span><span style="color:#323232;">      "actor": "https://endlesstalk.org/u/freamon",
</span><span style="color:#323232;">      "object": "https://midwest.social/post/7242862",
</span><span style="color:#323232;">      "type": "Like",
</span><span style="color:#323232;">      "id": "https://endlesstalk.org/activities/like/1f0b6132-547e-4fb5-8313-6f7b7f31be6b",
</span><span style="color:#323232;">      "audience": "https://lemmy.ml/c/asklemmy"
</span><span style="color:#323232;">    },
</span><span style="color:#323232;">    "type": "Undo",
</span><span style="color:#323232;">    "audience": "https://lemmy.ml/c/asklemmy"
</span><span style="color:#323232;">  },
</span><span style="color:#323232;">  "cc": [
</span><span style="color:#323232;">    "https://lemmy.ml/c/asklemmy/followers"
</span><span style="color:#323232;">  ],
</span><span style="color:#323232;">  "type": "Announce",
</span><span style="color:#323232;">  "id": "https://lemmy.ml/activities/announce/undo/feedfdca-3392-4f7b-a3ce-2306d8981c5c"
</span><span style="color:#323232;">}
</span>

The original Dislike activity (endlesstalk.org/…/e1f82f6a-d49b-4dab-b444-36c382f…) has a record at endlesstalk.org, but the Like object’s activity that’s been undone doesn’t (endlesstalk.org/…/1f0b6132-547e-4fb5-8313-6f7b7f3… just returns ‘No record found’)

I got the same results when I tried this from lemmy.world (but I thought I’d try again from a 0.19 instance)

I found some references to this at the GitHub, but they were issues that were closed off as being fixed, so I don’t know what the situation is with this now.

freamon,

For anyone else wondering, btw, it’s because lemmy expects all ‘id’ fields to be unique, so it would error if the inner object actually was a copy of the original vote.

scrubbles,
@scrubbles@poptalk.scrubbles.tech avatar

This was probably intentional, they don’t really need to say that somebody unlike or undisliked something. You just need to know that their vote is no longer valid. This is probably easier with Mastodon as well because they can and just erase whatever about it was, plus one or minus one, and essentially they don’t have a vote anymore.

Because if you really think about it, do you really need to know if somebody undisliked versus unlike something? Or do you only need to know that their vote is now removed?

Max_P,
@Max_P@lemmy.max-p.me avatar

Internally it’s even stored as a vote of either +1 or -1, so sending an undislike of a like probably also results in the vote’s removal. Lemmy just sums up all the votes and you have the score.

A like and a dislike activity are also contradictory, so even if you don’t unlike something, if you send a dislike it replaces the like as well.

scrubbles,
@scrubbles@poptalk.scrubbles.tech avatar

Exactly, that’s why to me this makes complete sense to me. An unlike is just resetting the score to zero or deleting the score altogether.

freamon,

Well, for my own nefarious purposes, I would’ve preferred to have all the info in one place. I’m not using Lemmy or Mastodon, just messing around with ActivityPub, so it’s be easier not to have to rely on past data about who voted for what that I haven’t necessarily kept.

scrubbles,
@scrubbles@poptalk.scrubbles.tech avatar

I don’t think that’s the architecture of ActivityPub though. It’s not meant to be a queryable thing, or a datastore. It only sends deltas, and it’s your job to keep the data you care about and apply the changes as they come through. It’s why when an instance subscribes to a community it never has before there is no history, because it doesn’t have any. (I think Lemmy goes and gets one page though)

freamon,

I would argue that I’m not asking it to be a queryable thing or a datastore. I wouldn’t expect a community’s ‘Accept’ of a ‘Follow’ to contain loads of data about past activity because that’s not a logical or practical thing to encapsulate. For an Undo though, there’s already a small, fixed-length encapsulated object inside, consistent with how ActivityPub is used for other circumstances. Since it’s there anyway, I don’t see the value in it containing incorrect, made-up data, when it may as well have the correct data.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • lemmy_support@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #