X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuser.ex;h=20767499966cbea34408f43c3a3dad6ad385df8f;hb=aaacebd906b0506b1d0f55df3047f0d730bd4b26;hp=0bc7dcab0aaebed7c9e59a80a76826ffb485552a;hpb=9972678a68605d24373f785f783d0fe60f77afdc;p=akkoma diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 0bc7dcab0..207674999 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -104,7 +104,7 @@ defmodule Pleroma.User do |> cast(params, [:bio, :name]) |> unique_constraint(:nickname) |> validate_format(:nickname, ~r/^[a-zA-Z\d]+$/) - |> validate_length(:bio, max: 1000) + |> validate_length(:bio, max: 5000) |> validate_length(:name, min: 1, max: 100) end @@ -323,7 +323,7 @@ defmodule Pleroma.User do end def decrease_note_count(%User{} = user) do - note_count = (user.info["note_count"] || 0) + note_count = user.info["note_count"] || 0 note_count = if note_count <= 0, do: 0, else: note_count - 1 new_info = Map.put(user.info, "note_count", note_count)