diff --git a/activitypub.py b/activitypub.py index 6e6d5845..cc83037e 100644 --- a/activitypub.py +++ b/activitypub.py @@ -194,7 +194,7 @@ class ActivityPub(User, Protocol): who we're delivering to and its id is populated into ``cc``. """ if to_cls.is_blocklisted(url): - logger.info(f'Skipping sending to {url}') + logger.info(f'Skipping sending to blocklisted {url}') return False orig_as2 = orig_obj.as_as2() if orig_obj else None @@ -202,6 +202,7 @@ class ActivityPub(User, Protocol): orig_obj=orig_as2) if g.user: + logger.debug(f'Overwriting actor with g.user {g.user.ap_actor()}') activity['actor'] = g.user.ap_actor() elif not activity.get('actor'): logger.warning('Outgoing AP activity has no actor!') diff --git a/atproto.py b/atproto.py index 5ba9c328..d6a2a1c9 100644 --- a/atproto.py +++ b/atproto.py @@ -272,7 +272,7 @@ class ATProto(User, Protocol): type = as1.object_type(obj.as1) if type in ('accept', 'undo'): - logger.info(f'Skipping sending to {url}') + logger.info(f'Skipping unsupported type {type}, not writing to repo') return False elif type == 'post': type = as1.object_type(as1.get_object(obj.as1)) diff --git a/protocol.py b/protocol.py index fc7acad0..b84456a4 100644 --- a/protocol.py +++ b/protocol.py @@ -706,6 +706,7 @@ class Protocol: if not to_id or not from_id: error(f'Follow activity requires object(s). Got: {obj.as1}') + logger.info(f'Follow {from_id} => {to_id}') to_cls = Protocol.for_id(to_id) if not to_cls: error(f"Couldn't determine protocol for {to_id}") diff --git a/web.py b/web.py index 64aeb1a1..b606fc9c 100644 --- a/web.py +++ b/web.py @@ -316,10 +316,15 @@ class Web(User, Protocol): # to followers, we just update our stored objects (elsewhere) and web # users consume them via feeds. verb = obj.as1.get('verb') - if (verb in ('accept', 'undo') - or url not in as1.targets(obj.as1) - or to_cls.is_blocklisted(url)): - logger.info(f'Skipping sending to {url}') + + if verb in ('accept', 'undo'): + logger.info(f'Skipping sending {verb} (not supported in webmention/mf2) to {url}') + return False + elif url not in as1.targets(obj.as1): + logger.info(f'Skipping sending to {url} , not a target in the object') + return False + elif to_cls.is_blocklisted(url): + logger.info(f'Skipping sending to blocklisted {url}') return False source_url = obj.proxy_url()