cosmetic/object: drop is_ prefix from is_tombstone_object?
The question mark suffix already implies it being an indicator function
This commit is contained in:
parent
7998a00346
commit
1c2eb4d799
2 changed files with 4 additions and 4 deletions
|
@ -216,9 +216,9 @@ def get_cached_by_ap_id(ap_id) do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Intentionally accepts non-Object arguments!
|
# Intentionally accepts non-Object arguments!
|
||||||
@spec is_tombstone_object?(term()) :: boolean()
|
@spec tombstone_object?(term()) :: boolean()
|
||||||
def is_tombstone_object?(%Object{data: %{"type" => "Tombstone"}}), do: true
|
def tombstone_object?(%Object{data: %{"type" => "Tombstone"}}), do: true
|
||||||
def is_tombstone_object?(_), do: false
|
def tombstone_object?(_), do: false
|
||||||
|
|
||||||
def make_tombstone(%Object{data: %{"id" => id, "type" => type}}, deleted \\ DateTime.utc_now()) do
|
def make_tombstone(%Object{data: %{"id" => id, "type" => type}}, deleted \\ DateTime.utc_now()) do
|
||||||
%ObjectTombstone{
|
%ObjectTombstone{
|
||||||
|
|
|
@ -560,7 +560,7 @@ defp handle_incoming_normalised(
|
||||||
|
|
||||||
with {_, {:ok, object_id}} <- {:object_id, oid_result},
|
with {_, {:ok, object_id}} <- {:object_id, oid_result},
|
||||||
object <- Object.get_cached_by_ap_id(object_id),
|
object <- Object.get_cached_by_ap_id(object_id),
|
||||||
{_, false} <- {:tombstone, Object.is_tombstone_object?(object) && !data["actor"]},
|
{_, false} <- {:tombstone, Object.tombstone_object?(object) && !data["actor"]},
|
||||||
{:ok, activity, _} <- Pipeline.common_pipeline(data, local: false) do
|
{:ok, activity, _} <- Pipeline.common_pipeline(data, local: false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue