1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.RichMedia.Parser.TTL.Opengraph do
6 @behaviour Pleroma.Web.RichMedia.Parser.TTL
9 def ttl(%{"ttl" => ttl_string}, _url) when is_binary(ttl_string) do
11 ttl = String.to_integer(ttl_string)
12 now = DateTime.utc_now() |> DateTime.to_unix()
19 def ttl(_, _), do: nil