+ clear_config([:instance, :safe_dm_mentions])
+ clear_config([:instance, :limit])
+ clear_config([:instance, :max_pinned_statuses])
+
+ test "when replying to a conversation / participation, it will set the correct context id even if no explicit reply_to is given" do
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{"status" => ".", "visibility" => "direct"})
+
+ [participation] = Participation.for_user(user)
+
+ {:ok, convo_reply} =
+ CommonAPI.post(user, %{"status" => ".", "in_reply_to_conversation_id" => participation.id})
+
+ assert Visibility.is_direct?(convo_reply)
+
+ assert activity.data["context"] == convo_reply.data["context"]
+ end
+