User: Truncate bios when updating a remote user.
This commit is contained in:
parent
3a63f84c45
commit
3f13437a9c
4 changed files with 16 additions and 3 deletions
|
|
@ -501,7 +501,15 @@ defmodule Pleroma.User do
|
|||
|
||||
params = Map.put(params, :last_refreshed_at, NaiveDateTime.utc_now())
|
||||
|
||||
params = if remote?, do: truncate_fields_param(params), else: params
|
||||
params =
|
||||
if remote? do
|
||||
params
|
||||
|> truncate_fields_param()
|
||||
|> truncate_if_exists(:name, name_limit)
|
||||
|> truncate_if_exists(:bio, bio_limit)
|
||||
else
|
||||
params
|
||||
end
|
||||
|
||||
struct
|
||||
|> cast(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue