inReplyTo can be empty
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b2db190056
commit
af8b3a7173
|
@ -146,6 +146,8 @@ defmodule Mobilizon.Service.ActivityPub.Utils do
|
||||||
}
|
}
|
||||||
|
|
||||||
# We fetch the parent object
|
# We fetch the parent object
|
||||||
|
unless !Map.has_key?("inReplyTo") || object_data["inReplyTo"] == nil ||
|
||||||
|
object_data["inReplyTo"] == "" do
|
||||||
data =
|
data =
|
||||||
case ActivityPub.fetch_object_from_url(object_data["inReplyTo"]) do
|
case ActivityPub.fetch_object_from_url(object_data["inReplyTo"]) do
|
||||||
# Reply to an event (Comment)
|
# Reply to an event (Comment)
|
||||||
|
@ -162,6 +164,7 @@ defmodule Mobilizon.Service.ActivityPub.Utils do
|
||||||
_ ->
|
_ ->
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
Logger.info("comment data ready to be inserted")
|
Logger.info("comment data ready to be inserted")
|
||||||
|
|
Loading…
Reference in a new issue