move to 2.5.5
[anni] / lib / pleroma / web / rich_media / parsers / twitter_card.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.RichMedia.Parsers.TwitterCard do
6   alias Pleroma.Web.RichMedia.Parsers.MetaTagsParser
7
8   @spec parse(list(), map()) :: map()
9   def parse(html, data) do
10     data
11     |> MetaTagsParser.parse(html, "og", "property")
12     |> MetaTagsParser.parse(html, "twitter", "name")
13     |> MetaTagsParser.parse(html, "twitter", "property")
14   end
15 end