Undo activities may not be handled. #91
Loading…
Add table
Add a link
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?
Some
Undoactivities are not handled correctly. The problem is that the remote server sends theobjectas only itsidinstead of the full object.Because it was undone, the remote server will return a 404 error code when Misskey tries to fetch the object with HTTP. Particularly, this is part of Litepub with its plausible deniability "features".
example Activity
In theory the
idis known to Misskey so it should be able to handle theUndo. However, thisidis either not saved when theCreateactivity is handled (e.g. for reactions) or not looked up when handling theUndo, even if external resolution fails (e.g. renotes).Steps to Reproduce
see also https://github.com/misskey-dev/misskey/issues/8796
Something I proposed in the Misskey issue was to have all ActivityPub
ids in a separate database table. I wonder if that could also be used to implement #53.But I don't really like the solution because of the potential added SQL join in some places.
Here is a discussion of all options I can think of. The final goal is having an easy way to go from database object to URI and back. This means it requires a relation containing: database id, table name and URI.
1) moving the URIs into a separate table
This is the solution I already mentioned previously.
The idea is that the current
urlcolumns/attributes would be removed, the values would be moved to a new table (e.g.uri_map). In the code, theuriattributes would be replaced with a join column that is a new entity.Advantages
Disadvantages
uriattributes have to be checked and maybe replaced.uri_map, having a foreign key with on cascade delete will only be possible in the wrong direction, more complicated logic to delete data fromuri_mapwould probably be necessary.2) duplicating the URIs in a separate table
Similar to 1) insofar as there is a new table created. However, the existing columns and attributes remain as is.
Advantages
Disadvantages
uri_maptable every time.3) creating a view
The implementation is somewhat similar to option 2, however no data is actually duplicated. A view is basically a query that is stored by the database engine and run every time you request data from the view. In this case the view would be a
UNIONof all the different tables that contain a URI.Advantages
Disadvantages
4) creating a materialized view
The initial implementation is similar to option 3, but then using it is more similar to option 2.
Advantages
Disadvantages