mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-20 08:30:59 +00:00
Fix never matching clause
`length/1` is only used with lists.
This commit is contained in:
parent
1629fa2412
commit
a87843693b
1 changed files with 1 additions and 1 deletions
|
@ -416,7 +416,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
def handle_incoming(%{"id" => nil}, _options), do: :error
|
||||
def handle_incoming(%{"id" => ""}, _options), do: :error
|
||||
# length of https:// = 8, should validate better, but good enough for now.
|
||||
def handle_incoming(%{"id" => id}, _options) when not (is_binary(id) and length(id) > 8),
|
||||
def handle_incoming(%{"id" => id}, _options) when is_binary(id) and byte_size(id) < 8,
|
||||
do: :error
|
||||
|
||||
# TODO: validate those with a Ecto scheme
|
||||
|
|
Loading…
Reference in a new issue