diff --git a/events/handlers/federation_handlers.py b/events/handlers/federation_handlers.py index 152434f..e36d120 100644 --- a/events/handlers/federation_handlers.py +++ b/events/handlers/federation_handlers.py @@ -30,14 +30,17 @@ async def _try_publish( ) -> None: """Publish an AP activity if federation is available and user has a profile.""" if not services.has("federation"): + log.debug("_try_publish: no federation service") return if not user_id: + log.debug("_try_publish: no user_id for %s#%s", source_type, source_id) return # Check user has an ActorProfile (chose a username) actor = await services.federation.get_actor_by_user_id(session, user_id) if not actor: + log.warning("_try_publish: no ActorProfile for user_id=%s", user_id) return # Don't re-publish if we already have an activity for this source @@ -45,6 +48,7 @@ async def _try_publish( session, source_type, source_id, ) if existing and activity_type == "Create": + log.debug("_try_publish: already published %s#%s", source_type, source_id) return # Already published try: