Pull in remote avatar on federation.
This commit is contained in:
parent
18edc299b2
commit
f9912599c4
4 changed files with 15 additions and 10 deletions
|
|
@ -134,13 +134,15 @@ defmodule Pleroma.Web.Websub do
|
|||
name = XML.string_from_xpath("/feed/author[1]/name", doc)
|
||||
preferredUsername = XML.string_from_xpath("/feed/author[1]/poco:preferredUsername", doc)
|
||||
displayName = XML.string_from_xpath("/feed/author[1]/poco:displayName", doc)
|
||||
avatar = OStatus.make_avatar_object(doc)
|
||||
|
||||
{:ok, %{
|
||||
uri: uri,
|
||||
hub: hub,
|
||||
nickname: preferredUsername || name,
|
||||
name: displayName || name,
|
||||
host: URI.parse(uri).host
|
||||
host: URI.parse(uri).host,
|
||||
avatar: avatar
|
||||
}}
|
||||
else e ->
|
||||
{:error, e}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue