Properly handle replying to an event that has been deleted

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-11-03 18:02:32 +01:00
parent 770a518ad1
commit 4bb90ebb3f
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -83,6 +83,10 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier do
{:ok, %Activity{} = activity, entity} ->
{:ok, activity, entity}
{:error, :entity_tombstoned} ->
Logger.debug("Tried to reply to an event that has been tombstoned")
:error
{:error, :event_not_allow_commenting} ->
Logger.debug("Tried to reply to an event for which comments are closed")
:error