diff options
author | Andrew Godwin | 2022-11-15 18:30:30 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-15 15:30:32 -0700 |
commit | 20e63023bb0d3c7e4cb36b91b73e79f51889cc90 (patch) | |
tree | 96c99139f03550e35902440cd321290bc47f8f0f /users/models/inbox_message.py | |
parent | 4aa92744aea6097ffb784ca7de6bd95cc599988d (diff) | |
download | takahe-20e63023bb0d3c7e4cb36b91b73e79f51889cc90.tar.gz takahe-20e63023bb0d3c7e4cb36b91b73e79f51889cc90.tar.bz2 takahe-20e63023bb0d3c7e4cb36b91b73e79f51889cc90.zip |
Get outbound likes/boosts and their undos working
Diffstat (limited to 'users/models/inbox_message.py')
-rw-r--r-- | users/models/inbox_message.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/users/models/inbox_message.py b/users/models/inbox_message.py index 6dbf5e8..b9bcfb4 100644 --- a/users/models/inbox_message.py +++ b/users/models/inbox_message.py @@ -46,6 +46,14 @@ class InboxMessageStates(StateGraph): raise ValueError( f"Cannot handle activity of type undo.{unknown}" ) + case "delete": + 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 |