From 132a65a87e49057d9dfff07a65fb5a94d9205875 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 4 Aug 2022 19:17:30 -0500 Subject: [PATCH 01/11] Remove .buildpacks --- .buildpacks | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .buildpacks diff --git a/.buildpacks b/.buildpacks deleted file mode 100644 index 31dd570966..0000000000 --- a/.buildpacks +++ /dev/null @@ -1 +0,0 @@ -https://github.com/hashnuke/heroku-buildpack-elixir From 97e141c5e39f79fb2175e4ed27d7e387122a931f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 4 Aug 2022 19:53:37 -0500 Subject: [PATCH 02/11] docker.exs: simplify database config --- config/docker.exs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/config/docker.exs b/config/docker.exs index f9f27d1415..4495bcc244 100644 --- a/config/docker.exs +++ b/config/docker.exs @@ -12,13 +12,18 @@ registrations_open: false, healthcheck: true -config :pleroma, Pleroma.Repo, - adapter: Ecto.Adapters.Postgres, - username: System.get_env("DB_USER", "pleroma"), - password: System.fetch_env!("DB_PASS"), - database: System.get_env("DB_NAME", "pleroma"), - hostname: System.get_env("DB_HOST", "db"), - pool_size: 10 +# Prefer `DATABASE_URL` if set, otherwise use granular env. +case System.get_env("DATABASE_URL") do + database_url when is_binary(database_url) -> + config :pleroma, Pleroma.Repo, url: database_url + + _ -> + config :pleroma, Pleroma.Repo, + username: System.get_env("DB_USER", "pleroma"), + password: System.fetch_env!("DB_PASS"), + database: System.get_env("DB_NAME", "pleroma"), + hostname: System.get_env("DB_HOST", "db") +end # Configure web push notifications config :web_push_encryption, :vapid_details, subject: "mailto:#{System.get_env("NOTIFY_EMAIL")}" From 9832ab2573d066168a9fbcf6c58882addb51a08b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 4 Aug 2022 22:37:37 -0500 Subject: [PATCH 03/11] docker-entrypoint: use $DATABASE_URL for pg_isready --- docker-entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 97390caf5e..20d488ff94 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,8 +2,10 @@ set -e +DATABASE_URL=${DATABASE_URL:"postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma}"} + echo "-- Waiting for database..." -while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma} -t 1; do +while ! pg_isready -U ${DB_USER:-pleroma} -d $DATABASE_URL -t 1; do sleep 1s done From d0d1457680902a249163c5ea50a4cffb57d10277 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 5 Aug 2022 09:32:42 -0500 Subject: [PATCH 04/11] Docker: respect PORT env, use 5000 by default --- Dockerfile | 2 -- config/docker.exs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c48980ba1..31f93f7b83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,6 +53,4 @@ COPY --from=build --chown=pleroma:0 /src/release ${HOME} COPY ./config/docker.exs /etc/pleroma/config.exs COPY ./docker-entrypoint.sh ${HOME} -EXPOSE 4000 - ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"] diff --git a/config/docker.exs b/config/docker.exs index 4495bcc244..636a433d44 100644 --- a/config/docker.exs +++ b/config/docker.exs @@ -2,7 +2,7 @@ config :pleroma, Pleroma.Web.Endpoint, url: [host: System.get_env("DOMAIN", "localhost"), scheme: "https", port: 443], - http: [ip: {0, 0, 0, 0}, port: 4000] + http: [ip: {0, 0, 0, 0}, port: System.get_env("PORT", "5000")] config :pleroma, :instance, name: System.get_env("INSTANCE_NAME", "Pleroma"), From c73a08869d0503278c1f701563fa7c5e535f794b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 5 Aug 2022 13:14:03 -0500 Subject: [PATCH 05/11] Deploy review app with Dokku --- .gitlab-ci.yml | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 582e283cca..95d01979ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -187,34 +187,25 @@ docs-deploy: - apk add curl script: - curl -X POST -F"token=$DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" https://git.pleroma.social/api/v4/projects/673/trigger/pipeline + +# Deploy with Dokku +# https://github.com/dokku/gitlab-ci +# https://github.com/dokku/ci-docker-image review_app: - image: alpine:3.9 + image: dokku/ci-docker-image stage: deploy - before_script: - - apk update && apk add openssh-client git - when: manual environment: name: review/$CI_COMMIT_REF_NAME - url: https://$CI_ENVIRONMENT_SLUG.pleroma.online/ - on_stop: stop_review_app + url: https://$CI_ENVIRONMENT_SLUG.dokku.soapbox.pub + # on_stop: stop_review_app only: - branches except: - - master - develop - script: - - echo "$CI_ENVIRONMENT_SLUG" - - mkdir -p ~/.ssh - - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts - - (ssh -t dokku@pleroma.online -- apps:create "$CI_ENVIRONMENT_SLUG") || true - - (ssh -t dokku@pleroma.online -- git:set "$CI_ENVIRONMENT_SLUG" keep-git-dir true) || true - - ssh -t dokku@pleroma.online -- config:set "$CI_ENVIRONMENT_SLUG" APP_NAME="$CI_ENVIRONMENT_SLUG" APP_HOST="$CI_ENVIRONMENT_SLUG.pleroma.online" MIX_ENV=dokku - - (ssh -t dokku@pleroma.online -- postgres:create $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db) || true - - (ssh -t dokku@pleroma.online -- postgres:link $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db "$CI_ENVIRONMENT_SLUG") || true - - (ssh -t dokku@pleroma.online -- certs:add "$CI_ENVIRONMENT_SLUG" /home/dokku/server.crt /home/dokku/server.key) || true - - git push -f dokku@pleroma.online:$CI_ENVIRONMENT_SLUG $CI_COMMIT_SHA:refs/heads/master + variables: + GIT_REMOTE_URL: ssh://$DOKKU_HOST/$CI_ENVIRONMENT_SLUG + script: dokku-deploy + after_script: [dokku-unlock] spec-deploy: stage: deploy From 9817db05f34b1e0315536f52f5bf0a7c356023ef Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 5 Aug 2022 13:47:23 -0500 Subject: [PATCH 06/11] GitLab CI: remove before_script from review_app --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95d01979ca..6753d976b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -206,6 +206,7 @@ review_app: GIT_REMOTE_URL: ssh://$DOKKU_HOST/$CI_ENVIRONMENT_SLUG script: dokku-deploy after_script: [dokku-unlock] + before_script: [] spec-deploy: stage: deploy From 9019550a27085fad7ec367012f831bf130a2f692 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 5 Aug 2022 14:20:57 -0500 Subject: [PATCH 07/11] Dokku: add missing dokku@ --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6753d976b1..160ce7bfb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -203,7 +203,7 @@ review_app: except: - develop variables: - GIT_REMOTE_URL: ssh://$DOKKU_HOST/$CI_ENVIRONMENT_SLUG + GIT_REMOTE_URL: ssh://dokku@$DOKKU_HOST/$CI_ENVIRONMENT_SLUG script: dokku-deploy after_script: [dokku-unlock] before_script: [] From 5d31b5a9e936fb213f37cdbc2a966bd586f261a2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 5 Aug 2022 14:59:25 -0500 Subject: [PATCH 08/11] Set GIT_DEPTH=0 for dokku deployment --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 160ce7bfb5..4d30f72b40 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,9 @@ variables: &global_variables POSTGRES_PASSWORD: postgres DB_HOST: postgres MIX_ENV: test + # Needed for Dokku deployment. + # https://github.com/dokku/dokku/issues/2514#issuecomment-616775470 + GIT_DEPTH: 0 cache: &global_cache_policy key: From d317e08b49dd6709d76aaa4ae22a6c26eabb3623 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 5 Aug 2022 15:42:56 -0500 Subject: [PATCH 09/11] Add app.json for Dokku --- app.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000000..41ecdb0630 --- /dev/null +++ b/app.json @@ -0,0 +1,13 @@ +{ + "name": "Soapbox BE", + "description": "Soapbox BE (Backend), the recommended backend for Soapbox based on Pleroma.", + "keywords": [ + "fediverse" + ], + "website": "https://soapbox.pub", + "dokku": { + "plugins": [ + "postgres" + ] + } +} \ No newline at end of file From 3d7d1870b59ce3d13880e912d054dd31617ec6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 7 Aug 2022 23:56:52 +0200 Subject: [PATCH 10/11] Expose nonAnonymous field from Smithereen polls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../object_validators/question_validator.ex | 1 + lib/pleroma/web/api_spec/schemas/poll.ex | 11 ++++++++++- lib/pleroma/web/mastodon_api/views/poll_view.ex | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/object_validators/question_validator.ex b/lib/pleroma/web/activity_pub/object_validators/question_validator.ex index 9412be4bc4..4bfa295084 100644 --- a/lib/pleroma/web/activity_pub/object_validators/question_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validators/question_validator.ex @@ -29,6 +29,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.QuestionValidator do field(:closed, ObjectValidators.DateTime) field(:voters, {:array, ObjectValidators.ObjectID}, default: []) + field(:nonAnonymous, :boolean) embeds_many(:anyOf, QuestionOptionsValidator) embeds_many(:oneOf, QuestionOptionsValidator) end diff --git a/lib/pleroma/web/api_spec/schemas/poll.ex b/lib/pleroma/web/api_spec/schemas/poll.ex index 91570582b0..cb2ffdc68a 100644 --- a/lib/pleroma/web/api_spec/schemas/poll.ex +++ b/lib/pleroma/web/api_spec/schemas/poll.ex @@ -56,6 +56,12 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Poll do } }, description: "Possible answers for the poll." + }, + pleroma: %Schema{ + type: :object, + properties: %{ + non_anonymous: %Schema{type: :boolean, description: "Is the voters collection public?"} + } } }, example: %{ @@ -79,7 +85,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Poll do votes_count: 4 } ], - emojis: [] + emojis: [], + pleroma: %{ + non_anonymous: false + } } }) end diff --git a/lib/pleroma/web/mastodon_api/views/poll_view.ex b/lib/pleroma/web/mastodon_api/views/poll_view.ex index 34e23873e1..1e3c9f36d4 100644 --- a/lib/pleroma/web/mastodon_api/views/poll_view.ex +++ b/lib/pleroma/web/mastodon_api/views/poll_view.ex @@ -21,7 +21,10 @@ def render("show.json", %{object: object, multiple: multiple, options: options} votes_count: votes_count, voters_count: voters_count(object), options: options, - emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"]) + emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"]), + pleroma: %{ + non_anonymous: object.data["nonAnonymous"] || false + } } if params[:for] do From b4575815edd9fa312286e141d4f8ad0390782612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 8 Aug 2022 10:45:43 +0200 Subject: [PATCH 11/11] Add entry to @context, tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- priv/static/schemas/litepub-0.1.jsonld | 4 +++- .../smithereen_non_anonymous_poll.json | 1 + test/fixtures/tesla_mock/smithereen_user.json | 1 + .../web/mastodon_api/views/poll_view_test.exs | 10 +++++++++- test/support/http_request_mock.ex | 18 ++++++++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json create mode 100644 test/fixtures/tesla_mock/smithereen_user.json diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld index 16c22ff0f6..d47f55c692 100644 --- a/priv/static/schemas/litepub-0.1.jsonld +++ b/priv/static/schemas/litepub-0.1.jsonld @@ -39,7 +39,9 @@ "@id": "as:alsoKnownAs", "@type": "@id" }, - "vcard": "http://www.w3.org/2006/vcard/ns#" + "vcard": "http://www.w3.org/2006/vcard/ns#", + "sm": "http://smithereen.software/ns#", + "nonAnonymous": "sm:nonAnonymous" } ] } diff --git a/test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json b/test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json new file mode 100644 index 0000000000..2b343ea642 --- /dev/null +++ b/test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json @@ -0,0 +1 @@ +{"type":"Question","id":"https://friends.grishka.me/posts/54642","attributedTo":"https://friends.grishka.me/users/1","content":"

здесь тоже можно что-то написать отдельно от опроса

","published":"2021-09-04T00:22:16Z","url":"https://friends.grishka.me/posts/54642","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://friends.grishka.me/users/1/followers"],"replies":{"type":"Collection","id":"https://friends.grishka.me/posts/54642/replies","first":{"type":"CollectionPage","items":[],"partOf":"https://friends.grishka.me/posts/54642/replies","next":"https://friends.grishka.me/posts/54642/replies?page=1"}},"sensitive":false,"likes":"https://friends.grishka.me/posts/54642/likes","name":"тестовый опрос","oneOf":[{"type":"Note","id":"https://friends.grishka.me/posts/54642#options/76","name":"тестовый ответ 1","replies":{"type":"Collection","id":"https://friends.grishka.me/activitypub/objects/polls/24/options/76/votes","totalItems":4,"items":[]}},{"type":"Note","id":"https://friends.grishka.me/posts/54642#options/77","name":"тестовый ответ 2","replies":{"type":"Collection","id":"https://friends.grishka.me/activitypub/objects/polls/24/options/77/votes","totalItems":4,"items":[]}},{"type":"Note","id":"https://friends.grishka.me/posts/54642#options/78","name":"тестовый ответ 3","replies":{"type":"Collection","id":"https://friends.grishka.me/activitypub/objects/polls/24/options/78/votes","totalItems":6,"items":[]}}],"votersCount":14,"nonAnonymous":true,"@context":["https://www.w3.org/ns/activitystreams",{"sensitive":"as:sensitive","toot":"http://joinmastodon.org/ns#","sm":"http://smithereen.software/ns#","votersCount":"toot:votersCount","nonAnonymous":"sm:nonAnonymous"}]} \ No newline at end of file diff --git a/test/fixtures/tesla_mock/smithereen_user.json b/test/fixtures/tesla_mock/smithereen_user.json new file mode 100644 index 0000000000..6468fc519f --- /dev/null +++ b/test/fixtures/tesla_mock/smithereen_user.json @@ -0,0 +1 @@ +{"type":"Person","id":"https://friends.grishka.me/users/1","name":"Григорий Клюшников","icon":{"type":"Image","image":{"type":"Image","url":"https://friends.grishka.me/i/6QLsOws97AWp5N_osd74C1IC1ijnFopyCBD9MSEeXNQ/q:93/bG9jYWw6Ly8vcy91cGxvYWRzL2F2YXRhcnMvNTYzODRhODEwODk5ZTRjMzI4YmY4YmQwM2Q2MWM3NmMud2VicA.jpg","mediaType":"image/jpeg","width":1280,"height":960},"width":573,"height":572,"cropRegion":[0.26422762870788574,0.3766937553882599,0.7113820910453796,0.9728997349739075],"url":"https://friends.grishka.me/i/ql_49PQcETAWgY_nC-Qj63H_Oa6FyOAEoWFkUSSkUvQ/c:573:572:nowe:338:362/q:93/bG9jYWw6Ly8vcy91cGxvYWRzL2F2YXRhcnMvNTYzODRhODEwODk5ZTRjMzI4YmY4YmQwM2Q2MWM3NmMud2VicA.jpg","mediaType":"image/jpeg"},"summary":"

Делаю эту хрень, пытаюсь вырвать социальные сети из жадных лап корпораций

\n

\n

\n

\n

\n

\n

\n

\n

This server does NOT support direct messages. Please write me on Telegram or Matrix.

","url":"https://friends.grishka.me/grishka","preferredUsername":"grishka","inbox":"https://friends.grishka.me/users/1/inbox","outbox":"https://friends.grishka.me/users/1/outbox","followers":"https://friends.grishka.me/users/1/followers","following":"https://friends.grishka.me/users/1/following","endpoints":{"sharedInbox":"https://friends.grishka.me/activitypub/sharedInbox","collectionSimpleQuery":"https://friends.grishka.me/users/1/collectionQuery"},"publicKey":{"id":"https://friends.grishka.me/users/1#main-key","owner":"https://friends.grishka.me/users/1","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjlakm+i/d9ER/hIeR7KfiFW+SdLZj2SkKIeM8cmR+YFJuh9ghFqXrkFEjcaqUnAFqe5gYDNSQACnDLA8y4DnzjfGNIohKAnRoa9x6GORmfKQvcnjaTZ53S1NvUiPPyc0Pv/vfCtY/Ab0CEXe5BLqL38oZn817Jf7pBrPRTYH7m012kvwAUTT6k0Y8lPITBEG7nzYbbuGcrN9Y/RDdwE08jmBXlZ45bahRH3VNXVpQE17dCzJB+7k+iJ1R7YCoI+DuMlBYGXGE2KVk46NZTuLnOjFV9SyXfWX4/SrJM4oxev+SX2N75tQgmNZmVVHeqg2ZcbC0WCfNjJOi2HHS9MujwIDAQAB\n-----END PUBLIC KEY-----\n"},"wall":"https://friends.grishka.me/users/1/wall","firstName":"Григорий","lastName":"Клюшников","middleName":"Александрович","vcard:bday":"1993-01-22","gender":"http://schema.org#Male","supportsFriendRequests":true,"friends":"https://friends.grishka.me/users/1/friends","groups":"https://friends.grishka.me/users/1/groups","capabilities":{"supportsFriendRequests":true},"@context":["https://www.w3.org/ns/activitystreams",{"sm":"http://smithereen.software/ns#","cropRegion":{"@id":"sm:cropRegion","@container":"@list"},"wall":{"@id":"sm:wall","@type":"@id"},"collectionSimpleQuery":"sm:collectionSimpleQuery","sc":"http://schema.org#","firstName":"sc:givenName","lastName":"sc:familyName","middleName":"sc:additionalName","gender":{"@id":"sc:gender","@type":"sc:GenderType"},"maidenName":"sm:maidenName","friends":{"@id":"sm:friends","@type":"@id"},"groups":{"@id":"sm:groups","@type":"@id"},"vcard":"http://www.w3.org/2006/vcard/ns#","capabilities":"litepub:capabilities","supportsFriendRequests":"sm:supportsFriendRequests","litepub":"http://litepub.social/ns#"},"https://w3id.org/security/v1"]} \ No newline at end of file diff --git a/test/pleroma/web/mastodon_api/views/poll_view_test.exs b/test/pleroma/web/mastodon_api/views/poll_view_test.exs index a73d862fd6..3aa73c224e 100644 --- a/test/pleroma/web/mastodon_api/views/poll_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/poll_view_test.exs @@ -43,7 +43,8 @@ test "renders a poll" do %{title: "why are you even asking?", votes_count: 0} ], votes_count: 0, - voters_count: 0 + voters_count: 0, + pleroma: %{non_anonymous: false} } result = PollView.render("show.json", %{object: object}) @@ -165,4 +166,11 @@ test "doesn't strips HTML tags" do ] } = PollView.render("show.json", %{object: object}) end + + test "that poll is non anonymous" do + object = Object.normalize("https://friends.grishka.me/posts/54642", fetch: true) + result = PollView.render("show.json", %{object: object}) + + assert result[:pleroma][:non_anonymous] == true + end end diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index a90610ccd6..76739d8f63 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -1419,6 +1419,24 @@ def get("https://gleasonator.com/users/macgirvin/collections/featured", _, _, _) }} end + def get("https://friends.grishka.me/posts/54642", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json"), + headers: activitypub_object_headers() + }} + end + + def get("https://friends.grishka.me/users/1", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/smithereen_user.json"), + headers: activitypub_object_headers() + }} + end + def get(url, query, body, headers) do {:error, "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{inspect(headers)}"}