Merge branch 'feature/custom-fields' into 'develop'
Add custom profile fields See merge request pleroma/pleroma!1488
This commit is contained in:
commit
ef43016b2c
18 changed files with 365 additions and 27 deletions
|
|
@ -222,12 +222,12 @@ defmodule Pleroma.User do
|
|||
|> validate_length(:name, min: 1, max: name_limit)
|
||||
end
|
||||
|
||||
def upgrade_changeset(struct, params \\ %{}) do
|
||||
def upgrade_changeset(struct, params \\ %{}, remote? \\ false) do
|
||||
bio_limit = Pleroma.Config.get([:instance, :user_bio_length], 5000)
|
||||
name_limit = Pleroma.Config.get([:instance, :user_name_length], 100)
|
||||
|
||||
params = Map.put(params, :last_refreshed_at, NaiveDateTime.utc_now())
|
||||
info_cng = User.Info.user_upgrade(struct.info, params[:info])
|
||||
info_cng = User.Info.user_upgrade(struct.info, params[:info], remote?)
|
||||
|
||||
struct
|
||||
|> cast(params, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue