swap context clauses around
This commit is contained in:
parent
1faf54ab41
commit
3e8a069f2a
2 changed files with 4 additions and 3 deletions
|
@ -57,12 +57,12 @@ defp get_replied_to_activities(activities) 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)
|
||||||
|
|
||||||
|
defp get_context_id(%{data: %{"context_id" => context_id}}) when not is_nil(context_id),
|
||||||
|
do: context_id
|
||||||
|
|
||||||
defp get_context_id(_), do: nil
|
defp get_context_id(_), do: nil
|
||||||
|
|
||||||
# Check if the user reblogged this status
|
# Check if the user reblogged this status
|
||||||
|
|
|
@ -6,6 +6,7 @@ def up do
|
||||||
DELETE FROM objects
|
DELETE FROM objects
|
||||||
WHERE (data->>'type') is null;
|
WHERE (data->>'type') is null;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
execute(statement)
|
execute(statement)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue