Deleting a branch is permanent. It CANNOT be undone. Continue?
delete-community
into federation
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?
I'm not sure how this should deal with removed/deleted, so I'm just treating both in the same way.
Okay this is not entirely correct, the tombstone should be served with http status 410. And there is also a
Remove
activity that we could use, but I would just go with one of them for now to keep things simpler.rev
Oops, still figuring out reviews.
Review
Ya this should be a
send_remove
. Just remove this line for now, lets leave all mod actions for later, those will get complicated.So you want to use only
Remove
activity for now and notDelete
? I'm not entirely sure how to handle that, the spec mentions nothing about a Tombstone for Remove.And I think we can just use the same activity (whether that is Delete or Remove) for both actions for now. Later we can add the different functionality for each.
No reason to use if let here unless you're using the variable it extracts. Just do
if data.deleted {...
Error:
expected
bool, found enum
std::option::Option``But your right the code is wrong, it doesnt even check the value of
deleted
. But I dont know how to do that without using a match or a second if statement.Sry, data.deleted.is_some()
That doesnt check whether the boolean is true either...
Hrm, I don't like this.
Two ideas:
Just add a
to_apub_tombstone
to that trait, that returnsResult<Tombstone, Error>
. Then you can still use the associated responsetype trait.Or, maybe since the return type can either be multiple types, either the thing, or a tombstone of the thing, maybe the ToApub trait should be made generic.
And implement it for both the tombstone and the regular object.
Okay I will go with a seperate ToTombstone trait, that seems easiest. Dont think the ToApub would work because we need to return tombstones for a lot of different object types.
I don't really like using enums as types, and doing switching like this. Use one of the suggestions above to have
to_apub
return different / generic types.This should be uncommented, and maybe added to the
ActorType
trait too.I have it in the ActorType already. Will probably handle posts etc seperately.
Okay guess I will handle posts etc in this PR as well because there isnt much else to do.
Ya move this into the trait functions.
Not sure what you mean.
Basically just removing that line and uncommenting:
So apub.post.rs, comment.rs has a send_delete also.
It seems weird to do all this tombstone work to just set it like this, but I had to do the same thing with likes and dislikes.
How else could we possibly do it? I guess ideally this would be handled by the API/wrapper, and we just call
remove(community)
, but for now we dont have much of a choice.You're right, I can't think of another way either, its unavoidable.
Thoughts on this?
Really I dont think it makes any sense to send the tombstone here, we should send an empty group/page/note.
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-formertype
It looks like we can set a formertype on the tombstone object and switch on that.