diff --git a/lib/federation/activity_pub/types/events.ex b/lib/federation/activity_pub/types/events.ex index 42d96d069..d6bc9113c 100644 --- a/lib/federation/activity_pub/types/events.ex +++ b/lib/federation/activity_pub/types/events.ex @@ -267,7 +267,15 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Events do Map.merge(args, %{ description: description, mentions: mentions, - tags: tags + # Exclude tags with length > 40 + tags: + Enum.filter(tags, fn tag -> + case tag do + # For some reason transmogrifier gives us this + %{title: tag} -> String.length(tag) < 40 + tag -> String.length(tag) < 40 + end + end) }) else args