Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/services/message-delivery-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,23 @@ export class MessageDeliveryService {
)) ?? undefined)
: undefined;

// Skip synthetic thread replies (closed/reopened) when anchor doesn't exist
// These have githubEntityType === parentType (e.g., "pr" for PR close event)
// Real entities like comments have different types (e.g., "comment" with parent "pr")
// (Retroactive anchor will be created by subsequent "edit" action)
if (
action === "create" &&
entityContext &&
!entityContext.isAnchor &&
entityContext.githubEntityType === entityContext.parentType &&
!threadId
) {
console.log(
`Skipping thread reply for ${entityContext.githubEntityType}:${entityContext.githubEntityId} - no anchor exists`
);
return;
}

switch (action) {
case "delete":
if (!entityContext) {
Expand Down