From 001a0ed1a50894ad1abe0f7fc9dc5b9666de5dae Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 19 Dec 2023 10:53:12 +0100 Subject: [PATCH] fix(activitypub): do not try to calculate timezone from missing geo-coordinates Signed-off-by: Thomas Citharel --- lib/federation/activity_stream/converter/event.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/federation/activity_stream/converter/event.ex b/lib/federation/activity_stream/converter/event.ex index 2eca4e805..76e695383 100644 --- a/lib/federation/activity_stream/converter/event.ex +++ b/lib/federation/activity_stream/converter/event.ex @@ -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,