Fix account lookup for nicknames beginning with numbers

This commit is contained in:
cascode 2019-04-02 10:51:33 +00:00 committed by lambda
commit 95c92c49c9
3 changed files with 34 additions and 1 deletions

View file

@ -46,7 +46,7 @@ defmodule Pleroma.FlakeId do
def from_string(string) when is_binary(string) and byte_size(string) < 18 do
case Integer.parse(string) do
{id, _} -> <<0::integer-size(64), id::integer-size(64)>>
{id, ""} -> <<0::integer-size(64), id::integer-size(64)>>
_ -> nil
end
end