From e9ebfdb83b91a632e7513360946f54b9d9aa353f Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 5 Sep 2017 11:40:34 +0200 Subject: [PATCH] Fix remote profile update code. --- lib/pleroma/web/ostatus/ostatus.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index 02a0996b0..3e2acdd0f 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -177,8 +177,8 @@ defmodule Pleroma.Web.OStatus do with false <- user.local, avatar <- make_avatar_object(doc), bio <- string_from_xpath("//author[1]/summary", doc), - name when not is_nil(name) <- string_from_xpath("//author[1]/poco:displayName", doc), - new_data <- %{avatar: avatar, name: name, bio: bio}, + name <- string_from_xpath("//author[1]/poco:displayName", doc), + new_data <- %{avatar: avatar || old_data.avatar, name: name || old_data.name, bio: bio || old_data.bio}, false <- new_data == old_data do change = Ecto.Changeset.change(user, new_data) Repo.update(change)