aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2018-01-30 12:20:39 +0100
committerRoger Braun <roger@rogerbraun.net>2018-01-30 12:20:39 +0100
commitad0ab3a57bc5591806cae0201d8077ffb10b6634 (patch)
tree97a935b5bd612b0c944285ec03c1438fa2344401
parentede4883ac93b1827c8fab125125bff94c1a855db (diff)
parent450109460674d914171bd1a1516a2c5faf355a7c (diff)
downloadpleroma-ad0ab3a57bc5591806cae0201d8077ffb10b6634.tar.gz
Merge branch 'hakabahitoyo/pleroma-feature/atom-feed-logo' into develop
-rw-r--r--lib/pleroma/web/ostatus/feed_representer.ex3
-rw-r--r--test/notification_test.exs4
-rw-r--r--test/web/ostatus/feed_representer_test.exs1
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/pleroma/web/ostatus/feed_representer.ex b/lib/pleroma/web/ostatus/feed_representer.ex
index 08710f246..10860ce04 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, [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'], []},
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
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
<id>#{OStatus.feed_path(user)}</id>
<title>#{user.nickname}'s timeline</title>
<updated>#{most_recent_update}</updated>
+ <logo>#{User.avatar_url(user)}</logo>
<link rel="hub" href="#{OStatus.pubsub_path(user)}" />
<link rel="salmon" href="#{OStatus.salmon_path(user)}" />
<link rel="self" href="#{OStatus.feed_path(user)}" type="application/atom+xml" />