[email] Return 451 for censored messages

This commit is contained in:
maike 2020-07-06 15:20:28 +02:00 committed by dl6tom
parent bda5e1a133
commit 1033b778aa

View file

@ -63,4 +63,4 @@ async def email_message_create(message: BodyMessage):
if await spawner.get(email_bot).publish(Message(message.text)): if await spawner.get(email_bot).publish(Message(message.text)):
return status.HTTP_201_CREATED return status.HTTP_201_CREATED
else: else:
return status.HTTP_406_NOT_ACCEPTABLE return status.HTTP_451_UNAVAILABLE_FOR_LEGAL_REASONS