diff options
author | tusooa <tusooa@kazv.moe> | 2022-09-04 18:43:36 +0000 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2022-09-04 18:43:36 +0000 |
commit | 20347898e22d10f377cd35f21407555dbac53bbf (patch) | |
tree | 2e8b1afbda166dc3368152e058e5caca2df65241 /lib/pleroma/web/common_api | |
parent | c63cf954dea70f76beed007e11902d0a0470fc3a (diff) | |
parent | 88c1c76d3eca3412d1e02008f1b8d96fe8fe0b96 (diff) | |
download | pleroma-20347898e22d10f377cd35f21407555dbac53bbf.tar.gz |
Merge branch 'fix/federation-context-issues' into 'develop'
Fix reply context fixing (Pleroma replies to Misskey threads) and removal of context objects
See merge request pleroma/pleroma!3717
Diffstat (limited to 'lib/pleroma/web/common_api')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 5fc8c3220..ff0814329 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -453,35 +453,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do def get_report_statuses(_, _), do: {:ok, nil} - # DEPRECATED mostly, context objects are now created at insertion time. - def context_to_conversation_id(context) do - with %Object{id: id} <- Object.get_cached_by_ap_id(context) do - id - else - _e -> - changeset = Object.context_mapping(context) - - case Repo.insert(changeset) do - {:ok, %{id: id}} -> - id - - # This should be solved by an upsert, but it seems ecto - # has problems accessing the constraint inside the jsonb. - {:error, _} -> - Object.get_cached_by_ap_id(context).id - end - end - end - - def conversation_id_to_context(id) do - with %Object{data: %{"id" => context}} <- Repo.get(Object, id) do - context - else - _e -> - {:error, dgettext("errors", "No such conversation")} - end - end - def validate_character_limit("" = _full_payload, [] = _attachments) do {:error, dgettext("errors", "Cannot post an empty status without attachments")} end |