Include/copy context
in Note activities #53
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
so this is part of the source of a lot of thread-breaky weirdness between the *keys and others
basically, the
context
key is not included on notes from *key, which makes resolving which thread they're a part of quite difficultcontext
is essentially an opaque string (by mastodon convention, a URLhttps://example.com/contexts/<id>
) which is created by the original post in a thread and simply copied in subsequent replies - nothing need be served at that URLthis alone would go a long way to fixing weird federation stuffs
examples of notes with context attached
generation of context ID *roma-side: https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/common_api/utils.ex#L230
We already have a
threadId
in the database which is just the id of the initial note in that thread. But if you say opaque string I guess we could just as well put the URL of that note in there?yeah that would actually work i think
(oh, and then copy on reply, so if you get context=abc in and reply to it, it should spit out context=abc again)
Looked at it quickly re: the copying bit.
Looks like to support copying we'll need to handle receiving federation to override the threadId to whatever the remote end's context is (if present, else default to current behavior).
I'm not sure where the "incoming" federation bits are yet, though.
But after that (+ the commit Johann already made) we should be compliant?
Copying the threadId from the context should work because threadId also appears to just be an opaque string (varchar 256 in particular).
At least on the backend, it's only really used for muting threads, so yeah.
My guess is backend's
src/remote/activitypub/models/note.ts
which calls intosrc/services/note/create.ts
- is that right @Johann150 ?To write this down since I looked it up now:
It is not completely an opaque string.
The ActivityStreams vocabulary specification for the
context
field saysRange: Object | Link
, i.e. it should be an ActivityStreams object or a link to one. Or of course - by virtue of JSON-LD - it can be just a URL which would be the ID of said object.Since the URL is just used as an ID, as far as I remember that still does not mean anything has to be served there.
We could potentially have an API endpoint that serves a Collection back from the context/threadId and serve that.
Could be a good exercise for me to start figuring out typeorm and such.
Undo
activities may not be handled. #91Finally sat down and figured out how to do the migration. The
threadId
column now holds the context URL instead of just the ID.Yes I believe that would be correct.