mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-01 01:30:46 +08:00
Simplify reactOnComment action
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
embeds: Embed[],
|
||||
) => Promise<void>;
|
||||
reactOnComment?: (
|
||||
publicKey: string,
|
||||
commentId: string,
|
||||
authors: Author[],
|
||||
reaction: string,
|
||||
@@ -436,8 +435,7 @@
|
||||
inline
|
||||
rid={codeComments.rid}
|
||||
{thread}
|
||||
reactOnComment={codeComments.reactOnComment &&
|
||||
partial(codeComments.reactOnComment, codeComments.config.publicKey)}
|
||||
reactOnComment={codeComments.reactOnComment}
|
||||
createReply={(codeComments.canReply ?? true)
|
||||
? async (body, embeds) => {
|
||||
await codeComments.createComment(body, embeds, thread.root.id);
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
embeds: Embed[],
|
||||
) => Promise<void>;
|
||||
reactOnComment: (
|
||||
publicKey: string,
|
||||
commentId: string,
|
||||
authors: Author[],
|
||||
reaction: string,
|
||||
@@ -149,7 +148,7 @@
|
||||
)}
|
||||
{editComment}
|
||||
createReply={createComment}
|
||||
reactOnComment={partial(reactOnComment, config.publicKey)} />
|
||||
{reactOnComment} />
|
||||
<div class="connector"></div>
|
||||
{/each}
|
||||
|
||||
|
||||
@@ -221,7 +221,6 @@
|
||||
}
|
||||
|
||||
async function reactOnComment(
|
||||
publicKey: string,
|
||||
commentId: string,
|
||||
authors: Author[],
|
||||
reaction: string,
|
||||
@@ -239,7 +238,7 @@
|
||||
reaction,
|
||||
review: review.id,
|
||||
active: !authors.find(
|
||||
({ did }) => publicKeyFromDid(did) === publicKey,
|
||||
({ did }) => publicKeyFromDid(did) === config.publicKey,
|
||||
),
|
||||
},
|
||||
opts: { announce: $nodeRunning && $announce },
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
}
|
||||
|
||||
async function reactOnComment(
|
||||
publicKey: string,
|
||||
commentId: string,
|
||||
authors: Author[],
|
||||
reaction: string,
|
||||
@@ -144,7 +143,7 @@
|
||||
reaction,
|
||||
revision: revision.id,
|
||||
active: !authors.find(
|
||||
({ did }) => publicKeyFromDid(did) === publicKey,
|
||||
({ did }) => publicKeyFromDid(did) === config.publicKey,
|
||||
),
|
||||
},
|
||||
opts: { announce: $nodeRunning && $announce },
|
||||
|
||||
Reference in New Issue
Block a user