Simplify reactOnComment action

This commit is contained in:
Thomas Scholtes
2025-07-16 12:58:03 +02:00
committed by Rūdolfs Ošiņš
parent fdabbac599
commit a33799d62a
5 changed files with 6 additions and 16 deletions
+2 -7
View File
@@ -230,7 +230,6 @@
}
async function reactOnComment(
publicKey: string,
commentId: string,
authors: Author[],
reaction: string,
@@ -244,7 +243,7 @@
id: commentId,
reaction,
active: !authors.find(
({ did }) => publicKeyFromDid(did) === publicKey,
({ did }) => publicKeyFromDid(did) === config.publicKey,
),
},
opts: { announce: $nodeRunning && $announce },
@@ -456,11 +455,7 @@
repo.delegates.map(delegate => delegate.did),
issue.body.author.did,
) && partial(editComment, issue.body.id)}
reactOnComment={partial(
reactOnComment,
config.publicKey,
issue.body.id,
)}>
reactOnComment={partial(reactOnComment, issue.body.id)}>
</CommentComponent>
</div>