make conversation-id deterministic #154

Merged
floatingghost merged 6 commits from conversation-id into develop 2022-08-06 20:59:16 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 3e8a069f2a - Show all commits

View File

@ -57,12 +57,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
end)
end
defp get_context_id(%{data: %{"context_id" => context_id}}) when not is_nil(context_id),
do: context_id
defp get_context_id(%{data: %{"context" => context}}) when is_binary(context),
do: :erlang.crc32(context)
defp get_context_id(%{data: %{"context_id" => context_id}}) when not is_nil(context_id),
do: context_id
defp get_context_id(_), do: nil
# Check if the user reblogged this status

View File

@ -6,6 +6,7 @@ defmodule Pleroma.Repo.Migrations.RemoveNullObjects do
DELETE FROM objects
WHERE (data->>'type') is null;
"""
execute(statement)
end