mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 02:31:00 +00:00
Actually do deletes right
This commit is contained in:
parent
f491fdb56e
commit
2d7f33879f
1 changed files with 8 additions and 7 deletions
|
@ -68,13 +68,14 @@ class InboxMessageStates(StateGraph):
|
|||
# If there is no object type, it's probably a profile
|
||||
if not isinstance(instance.message["object"], dict):
|
||||
await sync_to_async(Identity.handle_delete_ap)(instance.message)
|
||||
match instance.message_object_type:
|
||||
case "tombstone":
|
||||
await sync_to_async(Post.handle_delete_ap)(instance.message)
|
||||
case unknown:
|
||||
raise ValueError(
|
||||
f"Cannot handle activity of type delete.{unknown}"
|
||||
)
|
||||
else:
|
||||
match instance.message_object_type:
|
||||
case "tombstone":
|
||||
await sync_to_async(Post.handle_delete_ap)(instance.message)
|
||||
case unknown:
|
||||
raise ValueError(
|
||||
f"Cannot handle activity of type delete.{unknown}"
|
||||
)
|
||||
case unknown:
|
||||
raise ValueError(f"Cannot handle activity of type {unknown}")
|
||||
return cls.processed
|
||||
|
|
Loading…
Reference in a new issue