From b713b28dfdecb4a3f67550cd982be1450d774a81 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Tue, 30 Jan 2018 19:26:07 +0900 Subject: [PATCH 1/4] provide logo at feed.atom --- lib/pleroma/web/ostatus/feed_representer.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/pleroma/web/ostatus/feed_representer.ex b/lib/pleroma/web/ostatus/feed_representer.ex index 08710f246..bda017534 100644 --- a/lib/pleroma/web/ostatus/feed_representer.ex +++ b/lib/pleroma/web/ostatus/feed_representer.ex @@ -1,6 +1,8 @@ defmodule Pleroma.Web.OStatus.FeedRepresenter do alias Pleroma.Web.OStatus alias Pleroma.Web.OStatus.{UserRepresenter, ActivityRepresenter} + alias Pleroma.User + alias Pleroma.Web.MediaProxy def to_simple_form(user, activities, _users) do most_recent_update = (List.first(activities) || user).updated_at @@ -25,6 +27,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenter do {:id, h.(OStatus.feed_path(user))}, {:title, ['#{user.nickname}\'s timeline']}, {:updated, h.(most_recent_update)}, + {:logo, (User.avatar_url(user) |> MediaProxy.url())}, {:link, [rel: 'hub', href: h.(OStatus.pubsub_path(user))], []}, {:link, [rel: 'salmon', href: h.(OStatus.salmon_path(user))], []}, {:link, [rel: 'self', href: h.(OStatus.feed_path(user)), type: 'application/atom+xml'], []}, From cefb6cfea191c7a416b59d6f8e4d1f45acff4332 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Tue, 30 Jan 2018 19:37:04 +0900 Subject: [PATCH 2/4] provide logo at feed.atom (debug) --- lib/pleroma/web/ostatus/feed_representer.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/web/ostatus/feed_representer.ex b/lib/pleroma/web/ostatus/feed_representer.ex index bda017534..10860ce04 100644 --- a/lib/pleroma/web/ostatus/feed_representer.ex +++ b/lib/pleroma/web/ostatus/feed_representer.ex @@ -27,7 +27,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenter do {:id, h.(OStatus.feed_path(user))}, {:title, ['#{user.nickname}\'s timeline']}, {:updated, h.(most_recent_update)}, - {:logo, (User.avatar_url(user) |> MediaProxy.url())}, + {:logo, [to_charlist(User.avatar_url(user) |> MediaProxy.url())]}, {:link, [rel: 'hub', href: h.(OStatus.pubsub_path(user))], []}, {:link, [rel: 'salmon', href: h.(OStatus.salmon_path(user))], []}, {:link, [rel: 'self', href: h.(OStatus.feed_path(user)), type: 'application/atom+xml'], []}, From 1bb3ba02f398ff5ab94a8ddcc038db20b6474c0e Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 30 Jan 2018 12:17:01 +0100 Subject: [PATCH 3/4] Fix specs. --- test/web/ostatus/feed_representer_test.exs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/web/ostatus/feed_representer_test.exs b/test/web/ostatus/feed_representer_test.exs index df5a964e2..e10936366 100644 --- a/test/web/ostatus/feed_representer_test.exs +++ b/test/web/ostatus/feed_representer_test.exs @@ -26,6 +26,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenterTest do #{OStatus.feed_path(user)} #{user.nickname}'s timeline #{most_recent_update} + #{User.avatar_url(user)} From 450109460674d914171bd1a1516a2c5faf355a7c Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 30 Jan 2018 12:20:14 +0100 Subject: [PATCH 4/4] Make specs less breaky. --- test/notification_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/notification_test.exs b/test/notification_test.exs index eee1c9fa3..0a4462241 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -14,9 +14,9 @@ defmodule Pleroma.NotificationTest do {:ok, [notification, other_notification]} = Notification.create_notifications(activity) - assert notification.user_id == other_user.id + notified_ids = Enum.sort([notification.user_id, other_notification.user_id]) + assert notified_ids == [other_user.id, third_user.id] assert notification.activity_id == activity.id - assert other_notification.user_id == third_user.id assert other_notification.activity_id == activity.id end end