fix(activitypub): do not try to calculate timezone from missing geo-coordinates

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-12-19 10:53:12 +01:00
parent 64237cfc26
commit 001a0ed1a5
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -198,6 +198,8 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do
defp calculate_timezone(_object, nil), do: nil
defp calculate_timezone(_object, %Address{geom: nil}), do: nil
defp calculate_timezone(_object, %Address{geom: geom}) do
TimezoneDetector.detect(
nil,