Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85197666
opengraph.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
537 B
Referenced Files
None
Subscribers
None
opengraph.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.RichMedia.Parser.TTL.Opengraph
do
@behaviour
Pleroma.Web.RichMedia.Parser.TTL
@impl
true
def
ttl
(%{
"ttl"
=>
ttl_string
},
_url
)
when
is_binary
(
ttl_string
)
do
try
do
ttl
=
String
.
to_integer
(
ttl_string
)
now
=
DateTime
.
utc_now
()
|>
DateTime
.
to_unix
()
now
+
ttl
rescue
_
->
nil
end
end
def
ttl
(
_
,
_
),
do
:
nil
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Mon, Jun 29, 9:30 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1626711
Default Alt Text
opengraph.ex (537 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment