a digital entity named phi that roams bsky phi.zzstoatzz.io
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use reason_subject (the actual post) not uri (the like record)

notification.uri for likes/reposts is the engagement record itself,
not the post that was liked. get_posts on a like URI returns empty,
so thread context was never fetched. reason_subject has the post URI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+6 -9
+6 -9
src/bot/services/message_handler.py
··· 128 128 async def _build_engagement_entry(self, notification) -> dict | None: 129 129 """Build the notifications_context entry for a like/repost. 130 130 131 - For these, notification.uri is phi's own post that was engaged with — 132 - so we fetch it for context but the action target (if phi decides to 133 - respond) is the engager's profile, not the post. 134 - 135 - Thread context is fetched so phi can understand *what conversation* 136 - the liked post belongs to — a like on an authorization-request post 137 - in a thread about following someone is very different from a like 138 - on a standalone musing. 131 + notification.uri is the engagement record (like/repost), NOT the post. 132 + notification.reason_subject is the URI of phi's post that was engaged 133 + with. We fetch that post for context + thread history. 139 134 """ 140 - post_uri = notification.uri 135 + # reason_subject is the actual post that was liked/reposted 136 + post_uri = getattr(notification, "reason_subject", None) or notification.uri 141 137 post_text = "" 142 138 cid = "" 143 139 root_uri = post_uri ··· 147 143 with logfire.span( 148 144 "build engagement entry", 149 145 post_uri=post_uri, 146 + engagement_uri=notification.uri, 150 147 author=notification.author.handle, 151 148 reason=notification.reason, 152 149 ):