[#534] Websub fix: made SQL use UTC time zone when comparing with valid_until
(instead of postgresql-server default time zone).
This commit is contained in:
parent
656ed7c84a
commit
465adedb7c
@ -64,7 +64,7 @@ def publish(topic, user, %{data: %{"type" => type}} = activity)
|
|||||||
from(
|
from(
|
||||||
sub in WebsubServerSubscription,
|
sub in WebsubServerSubscription,
|
||||||
where: sub.topic == ^topic and sub.state == "active",
|
where: sub.topic == ^topic and sub.state == "active",
|
||||||
where: fragment("? > NOW()", sub.valid_until)
|
where: fragment("? > (NOW() at time zone 'UTC')", sub.valid_until)
|
||||||
)
|
)
|
||||||
|
|
||||||
subscriptions = Repo.all(query)
|
subscriptions = Repo.all(query)
|
||||||
|
Loading…
Reference in New Issue
Block a user