Ignore unknown create/update types (#569)

pull/571/head
Christof Dorner 2023-05-04 22:56:50 +00:00 zatwierdzone przez GitHub
rodzic dbc25f538d
commit a4e6033a0b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 0 dodań i 8 usunięć

Wyświetl plik

@ -42,10 +42,6 @@ class InboxMessageStates(StateGraph):
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":
@ -65,10 +61,6 @@ class InboxMessageStates(StateGraph):
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":