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

treat message update and delete differently if message is invocation of currently processing command #8

Open
Jacherr opened this issue Feb 24, 2024 · 0 comments
Labels
assyst-core enhancement New feature or request

Comments

@Jacherr
Copy link
Owner

Jacherr commented Feb 24, 2024

There is a special case in the gateway handling logic, which involves the case as follows:

  • A user invokes a command, in particular a slow one.
  • The command begins processing, and during the processing phase, i.e., while the command function is executing, the invocation message is updated or deleted.

This needs to be handled differently from usual message updates or deletes. In particular:

  • If the invocation is updated to a new command, ignore it, to avoid overwriting the currently executing command,
  • If the invocation is updated to a non-command message, stop responding to the invocation and delete any existing response, to avoid a 'ghost command', i.e., a command with no apparent invocation,
  • If the invocation is deleted, do the same as the second point.

This will need to be handled by tracking message events, and seeing if a currently cached Reply object has its invocation message_id updated or deleted. If so, check the status of that command with ReplyState to see if it still ReplyState::Processing. If so, perform one of the above actions.

@Jacherr Jacherr added enhancement New feature or request assyst-core labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assyst-core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant