Skip to content
Snippets Groups Projects
Commit b9f84a38 authored by rinpatch's avatar rinpatch
Browse files

Normalize the object only after ensuring the activity type is Create

parent 131f8832
No related branches found
No related tags found
No related merge requests found
......@@ -47,8 +47,8 @@ defmodule Pleroma.Conversation do
"""
def create_or_bump_for(activity) do
with true <- Pleroma.Web.ActivityPub.Visibility.is_direct?(activity),
object <- Pleroma.Object.normalize(activity),
"Create" <- activity.data["type"],
object <- Pleroma.Object.normalize(activity),
"Note" <- object.data["type"],
ap_id when is_binary(ap_id) and byte_size(ap_id) > 0 <- object.data["context"] do
{:ok, conversation} = create_for_ap_id(ap_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment