1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-19 11:29:17 +00:00

[#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:
Ivan Tashkinov 2019-01-25 18:29:43 +03:00
parent 656ed7c84a
commit 465adedb7c

View file

@ -64,7 +64,7 @@ def publish(topic, user, %{data: %{"type" => type}} = activity)
from(
sub in WebsubServerSubscription,
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)