projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log ostatus handling errors.
[akkoma]
/
lib
/
pleroma
/
web
/
ostatus
/
ostatus.ex
diff --git
a/lib/pleroma/web/ostatus/ostatus.ex
b/lib/pleroma/web/ostatus/ostatus.ex
index 02a0996b0c80f6fe4bb143267af30bedb4b9a028..882226172f8da39481f4dacbc35a96f032bbc772 100644
(file)
--- a/
lib/pleroma/web/ostatus/ostatus.ex
+++ b/
lib/pleroma/web/ostatus/ostatus.ex
@@
-56,6
+56,7
@@
defmodule Pleroma.Web.OStatus do
rescue
e ->
Logger.error("Error occured while handling activity")
rescue
e ->
Logger.error("Error occured while handling activity")
+ Logger.error(xml_string)
Logger.error(inspect(e))
nil
end
Logger.error(inspect(e))
nil
end
@@
-177,8
+178,8
@@
defmodule Pleroma.Web.OStatus do
with false <- user.local,
avatar <- make_avatar_object(doc),
bio <- string_from_xpath("//author[1]/summary", doc),
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)
false <- new_data == old_data do
change = Ecto.Changeset.change(user, new_data)
Repo.update(change)
@@
-299,7
+300,7
@@
defmodule Pleroma.Web.OStatus do
end
def fetch_activity_from_url(url) do
end
def fetch_activity_from_url(url) do
- with {:ok, activities} <- fetch_activity_from_atom_url(url) do
+ with {:ok, activities}
when length(activities) > 0
<- fetch_activity_from_atom_url(url) do
{:ok, activities}
else
_e -> with {:ok, activities} <- fetch_activity_from_html_url(url) do
{:ok, activities}
else
_e -> with {:ok, activities} <- fetch_activity_from_html_url(url) do