Ignore unknown create/update types (#569)
This commit is contained in:
parent
dbc25f538d
commit
a4e6033a0b
|
@ -42,10 +42,6 @@ class InboxMessageStates(StateGraph):
|
||||||
case unknown:
|
case unknown:
|
||||||
if unknown in Post.Types.names:
|
if unknown in Post.Types.names:
|
||||||
await sync_to_async(Post.handle_create_ap)(instance.message)
|
await sync_to_async(Post.handle_create_ap)(instance.message)
|
||||||
else:
|
|
||||||
raise ValueError(
|
|
||||||
f"Cannot handle activity of type create.{unknown}"
|
|
||||||
)
|
|
||||||
case "update":
|
case "update":
|
||||||
match instance.message_object_type:
|
match instance.message_object_type:
|
||||||
case "note":
|
case "note":
|
||||||
|
@ -65,10 +61,6 @@ class InboxMessageStates(StateGraph):
|
||||||
case unknown:
|
case unknown:
|
||||||
if unknown in Post.Types.names:
|
if unknown in Post.Types.names:
|
||||||
await sync_to_async(Post.handle_update_ap)(instance.message)
|
await sync_to_async(Post.handle_update_ap)(instance.message)
|
||||||
else:
|
|
||||||
raise ValueError(
|
|
||||||
f"Cannot handle activity of type update.{unknown}"
|
|
||||||
)
|
|
||||||
case "accept":
|
case "accept":
|
||||||
match instance.message_object_type:
|
match instance.message_object_type:
|
||||||
case "follow":
|
case "follow":
|
||||||
|
|
Loading…
Reference in New Issue