CommonFields: remove context_id
This commit is contained in:
parent
f3e061c964
commit
7f71e3d0fe
@ -51,8 +51,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFields do
|
|||||||
field(:summary, :string)
|
field(:summary, :string)
|
||||||
|
|
||||||
field(:context, :string)
|
field(:context, :string)
|
||||||
# short identifier for PleromaFE to group statuses by context
|
|
||||||
field(:context_id, :integer)
|
|
||||||
|
|
||||||
field(:sensitive, :boolean, default: false)
|
field(:sensitive, :boolean, default: false)
|
||||||
field(:replies_count, :integer, default: 0)
|
field(:replies_count, :integer, default: 0)
|
||||||
|
@ -57,9 +57,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||||||
end)
|
end)
|
||||||
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),
|
defp get_context_id(%{data: %{"context" => context}}) when is_binary(context),
|
||||||
do: :erlang.crc32(context)
|
do: :erlang.crc32(context)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user