Today I tagged the v4.0.0-beta.2 release purely to fix a single issue — Update(Note) federation.
It turns out that just sending the Update(Note) activity was not enough, the underlying object needed to also have the updated field set in order to Mastodon to process the update. My guess is Mastodon checks that field and only processes the note if the value is greater than the last known value.
I'd write it off as a Mastodon-ism, but it's actually better to have that property present, so now it is.
Tbf it feels like Mastodon could assume that the update is the latest one if there is no updated field and only use the updated fields to not apply an update, if the updated field is before the last update. Does that make sense?
@sortekanin@socialhub.activitypub.rocks Yes and no, I can see how that would be logical, but there could potentially be issues if subsequent updates were delivered out of order (due to a variety of reasons one can dream up).
In that scenario you wouldn't want to assume that the undated updated is the latest.
This whole thing could actually be sidestepped if we sent timestamps with our activities, but that's not in the spec, so I guess nobody does it heh.
This whole thing could actually be sidestepped if we sent timestamps with our activities, but that's not in the spec, so I guess nobody does it heh.
Not sure what you mean here? Any Mastodon (or misskey or...) Create(Note) has a published property on the Create activity with a timestamp and a published property on the Note object with a timestamp.
This article published two weeks ago mentions the issue (highlight mine) ..
Another example I personally encountered was a frustrating issue while implementing ActivityPub for this blog: updating a post propagated to Lemmy but not Mastodon. Despite the Update activity being accepted, Mastodon silently rejected it unless the updated timestamp changed—a logical but unofficial requirement. Developers must track down subtle implementation details that aren’t formally documented, significantly complicating adoption and usage.
I’d write it off as a Mastodon-ism, but it’s actually better to have that property present, so now it is.
So one that’s becoming de-facto standard. Ideally if Mastodon introduces such logic, it is up to them to remember to inform the broader developer community via a FEP.
Aside: "If all we have is a Note .. "
Overall it is such a pity that everything is to be a Note or else.. And the default pragmatic urge of most devs is to assign app-specific business logic to an existing or custom property within it, to create all the behavioral flavors. And then call it a day “my app works” and throw the protocol decay out in the ecosystem.
What do we do when we “Edit a Note”? Is using the CRUD of ActivityStreams really the best option, or are we really “Creating a Revision”. Shouldn’t ActivityPub have a proper way to Revision Control across the board?
If my new Fediverse app included both editable and non-editable posts, how I’d hack that in on top of the current mechanism? Just pondering this. It seems we go out of our way not to use the extension mechanism of ActivityPub as it was intended to be used, cramming everything in NoteCrud™. Is that official best-practice for the future fediverse now, I wonder.
Many more examples seen in discussions. The ActivityPub specs state that you may ditch JSON-LD for plain JSON, but doesn’t say that the whole idea of a semantic type model should be thrown out of the window as well. In Distinguish between posts and direct messages the example is people going out of their way not to define ChatMessage in favor of Note + property-logic.