2020-02-18 08:57:00 +01:00
|
|
|
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Conversations.Comment do
|
2019-03-04 17:20:18 +01:00
|
|
|
alias Phoenix.HTML.Tag
|
2020-02-18 08:57:00 +01:00
|
|
|
alias Mobilizon.Conversations.Comment
|
2019-03-04 17:20:18 +01:00
|
|
|
|
2020-06-15 16:20:58 +02:00
|
|
|
def build_tags(%Comment{} = comment, _locale \\ "en") do
|
2019-03-04 17:20:18 +01:00
|
|
|
[
|
|
|
|
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
|