Extract RSS Feed functionality from OStatus
[akkoma] / lib / pleroma / web / metadata / feed.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.Metadata.Providers.Feed do
6 alias Pleroma.Web.Endpoint
7 alias Pleroma.Web.Metadata.Providers.Provider
8 alias Pleroma.Web.Router.Helpers
9
10 @behaviour Provider
11
12 @impl Provider
13 def build_tags(%{user: user}) do
14 [
15 {:link,
16 [
17 rel: "alternate",
18 type: "application/atom+xml",
19 href: Helpers.feed_path(Endpoint, :feed, user.nickname) <> ".atom"
20 ], []}
21 ]
22 end
23 end