X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Futils.ex;h=d6ac2dd8c294c0af345500a061aca89ec2f8c3cb;hb=1e9ced5af478ba38c9e9d46140891a8f4473e02d;hp=8b5feef1c7eb75e1710b7538720e453ac517b4e5;hpb=2f1f1a4f30430544d77c82627011800b65d51ba3;p=akkoma diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 8b5feef1c..d6ac2dd8c 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -37,6 +37,11 @@ defmodule Pleroma.Web.ActivityPub.Utils do recipient_in_collection(ap_id, params["bcc"]) -> true + # if the message is unaddressed at all, then assume it is directly addressed + # to the recipient + !params["to"] && !params["cc"] && !params["bto"] && !params["bcc"] -> + true + true -> false end @@ -55,7 +60,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do if need_splice do params - |> Map.put(params, "cc", [ap_id | cc_list]) + |> Map.put("cc", [ap_id | cc_list]) else params end