logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

twitter_card.ex (514B)


  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. defmodule Pleroma.Web.RichMedia.Parsers.TwitterCard do
  5. alias Pleroma.Web.RichMedia.Parsers.MetaTagsParser
  6. @spec parse(list(), map()) :: map()
  7. def parse(html, data) do
  8. data
  9. |> MetaTagsParser.parse(html, "og", "property")
  10. |> MetaTagsParser.parse(html, "twitter", "name")
  11. |> MetaTagsParser.parse(html, "twitter", "property")
  12. end
  13. end