Skip to content

Commit

Permalink
Ignore unknown create/update types (jointakahe#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
chdorner authored May 4, 2023
1 parent dbc25f5 commit a4e6033
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions users/models/inbox_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ async def handle_received(cls, instance: "InboxMessage"):
case unknown:
if unknown in Post.Types.names:
await sync_to_async(Post.handle_create_ap)(instance.message)
else:
raise ValueError(
f"Cannot handle activity of type create.{unknown}"
)
case "update":
match instance.message_object_type:
case "note":
Expand All @@ -65,10 +61,6 @@ async def handle_received(cls, instance: "InboxMessage"):
case unknown:
if unknown in Post.Types.names:
await sync_to_async(Post.handle_update_ap)(instance.message)
else:
raise ValueError(
f"Cannot handle activity of type update.{unknown}"
)
case "accept":
match instance.message_object_type:
case "follow":
Expand Down

0 comments on commit a4e6033

Please sign in to comment.