+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Metadata.Providers.TwitterCard do
+ alias Pleroma.Web.Metadata.Providers.Provider
+
+ @behaviour Provider
+
+ @impl Provider
def build_tags(%{activity: activity}) do
if Enum.any?(activity.data["object"]["tag"], fn tag -> tag == "nsfw" end) or
activity.data["object"]["attachment"] == [] do
end
end
+ @impl Provider
def build_tags(_) do
[{:meta, [property: "twitter:card", content: "summary"], []}]
end