Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix farcaster client process action issue #963

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

sin-bufan
Copy link
Contributor

Relates to:

Fix the bug where Farcaster client does NOT fire any actions

Risks

Low
Only fixes action handling in existing functionality
No structural changes to the codebase
No database schema changes

Background

What does this PR do?

  1. Fixes the bug where Farcaster client does not fire any actions
  2. Adds cast hash to message memory for later use in action handler

What kind of change is this?

Bug fixes (non-breaking change which fixes an issue)

Why are we doing this? Any context or related work?

Currently, when the Farcaster client generates responses that should trigger actions (like following a user or reacting to a cast), these actions are not being executed. This happens because:

  1. The action information is being lost during the response chain
  2. The cast hash, which is necessary for some actions, is not properly stored in the message memory
  3. The action handlers don't receive the complete context they need

This bug prevents important bot functionalities from working, such as:

  • Automatic following of users who interact with the bot
  • Reacting to casts when appropriate
  • Any custom actions defined in the bot's behavior

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

  1. Review the changes in packages/client-farcaster/src/interactions.ts
  2. Focus on the handleCast method where action handling is fixed

Detailed testing steps

  1. Set up a test Farcaster bot
  2. Send a mention that should trigger an action
  3. Verify that:
  • The bot responds appropriately
  • Actions are properly fired
  • Cast hash is correctly stored in message memory
  • Action handlers receive the necessary context

Discord username

sin_bufan

@sin-bufan sin-bufan changed the title Fix farcaster client process actiona Fix farcaster client process action issue Dec 10, 2024
Copy link
Collaborator

@monilpat monilpat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for doing this :)

@odilitime odilitime merged commit 61d02ae into elizaOS:main Dec 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants