mobilizon.chapril.org-mobil.../lib/service/metadata/comment.ex
Thomas Citharel 4144e9ffd0
Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-03 16:01:26 +02:00

15 lines
560 B
Elixir

defimpl Mobilizon.Service.Metadata, for: Mobilizon.Conversations.Comment do
alias Phoenix.HTML.Tag
alias Mobilizon.Conversations.Comment
def build_tags(%Comment{} = comment) do
[
Tag.tag(:meta, property: "og:title", content: comment.actor.preferred_username),
Tag.tag(:meta, property: "og:url", content: comment.url),
Tag.tag(:meta, property: "og:description", content: comment.text),
Tag.tag(:meta, property: "og:type", content: "website"),
Tag.tag(:meta, property: "twitter:card", content: "summary")
]
end
end