For existing users, just replace info.

This commit is contained in:
lain 2018-02-18 23:11:31 +01:00
parent decbf3a47f
commit 8b11546334
1 changed files with 6 additions and 0 deletions

View File

@ -273,6 +273,12 @@ def make_user_from_ap_id(ap_id) do
}
User.insert_or_update_user(user_data)
if user = User.get_by_ap_id(ap_id) do
User.info_changeset(user, user_data}
|> Repo.update
else
User.insert_or_update_user(user_data)
end
end
end