projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
703d9f3
)
Some servers send empty lease_seconds requests...
author
Roger Braun
<roger@rogerbraun.net>
Mon, 1 May 2017 18:09:00 +0000
(20:09 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Mon, 1 May 2017 18:09:00 +0000
(20:09 +0200)
lib/pleroma/web/websub/websub.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/websub/websub.ex
b/lib/pleroma/web/websub/websub.ex
index b279a50609cad64f3e33d371c6845c9737ce5978..905c237a088ecb9ca426eca77181f9c1c1a2ce6e 100644
(file)
--- a/
lib/pleroma/web/websub/websub.ex
+++ b/
lib/pleroma/web/websub/websub.ex
@@
-89,6
+89,11
@@
defmodule Pleroma.Web.Websub do
Repo.get_by(WebsubServerSubscription, topic: topic, callback: callback) || %WebsubServerSubscription{}
end
+ # Temp hack for mastodon.
+ defp lease_time(%{"hub.lease_seconds" => ""}) do
+ {:ok, 60 * 60 * 24 * 3} # three days
+ end
+
defp lease_time(%{"hub.lease_seconds" => lease_seconds}) do
{:ok, String.to_integer(lease_seconds)}
end