Skip to content

Commit

Permalink
fix praising praise handle
Browse files Browse the repository at this point in the history
  • Loading branch information
RamRamez committed Oct 10, 2024
1 parent fcfb660 commit dca8e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Add your reason for giving praise at the end of the comment and double check tha
const praiseHandle = process.env.PRAISE_FARCASTER_HANDLE;
// TODO: Should consider only first mention as praise receiver
const isPraiseHandleReceiver = text.startsWith(`@${praiseHandle} to @${praiseHandle}`);
const praiseReceiver = isPraiseHandleReceiver ? praiseHandle : mentioned_profiles.find((profile: any) => profile.username !== praiseHandle)
const praiseReceiver = mentioned_profiles.find((profile: any) => isPraiseHandleReceiver ? profile.username === praiseHandle : profile.username !== praiseHandle)
if (!praiseReceiver) {
await neynarClient.publishCast(
process.env.SIGNER_UUID,
Expand Down

0 comments on commit dca8e2d

Please sign in to comment.