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 the issue of no reply in a threaded mentioned message #71

Closed

Conversation

maxshine
Copy link

@maxshine maxshine commented Jan 9, 2024

Dear reviewer

Issue Summary

This PR is to fix an issue that the bot ignore following mentioned messages in a threaded conversation
The opened issue is #70, which this PR is targeted.

Fix details

The is_no_mention_thread method defined in slack_ops.py returns the negated value than the correct one. This cause the app deems the message in a thread as a not mentioned one and ignore it. So a negate operation was added to fix it.

Would you please kindly review it?

Thanks.

@seratch
Copy link
Owner

seratch commented Jan 9, 2024

Hi @maxshine, thanks for sharing the issue. The pattern you reported should be supported, but changing this method's behavior breaks an intenational design of this app, which does not allow involving ChatGPT in the middle of a thread convo (this could be pretty annoying because after that, the bot will reply to every single message in the thread.)

The internal method name looks confusing, so I will refactor the code to suppor your use case later

@maxshine
Copy link
Author

maxshine commented Jan 9, 2024

Hi @maxshine, thanks for sharing the issue. The pattern you reported should be supported, but changing this method's behavior breaks an intenational design of this app, which does not allow involving ChatGPT in the middle of a thread convo (this could be pretty annoying because after that, the bot will reply to every single message in the thread.)

The internal method name looks confusing, so I will refactor the code to suppor your use case later

Hey @seratch

Thank you for the reply.

I think the current logic is to let bot reply to the messages mentioning itself, not to every single one in the thread. The is_not_mention_thread check the immediate parent message if it has the bot user id, which is the latest message sent in the thread.

Can you please evaluate it if this is a reasonable case?

Thank you.

@seratch
Copy link
Owner

seratch commented Jan 9, 2024

I mean, when you use this app in a channel, this app requires mentioning the app's bot user to start the conversation thread with ChatGPT. In the thread, you don't need to mention the bot. Modifying the internal method breaks the behavior because the method is used in the app_mention event handler too.

@maxshine
Copy link
Author

maxshine commented Jan 9, 2024

I mean, when you use this app in a channel, this app requires mentioning the app's bot user to start the conversation thread with ChatGPT. In the thread, you don't need to mention the bot. Modifying the internal method breaks the behavior because the method is used in the app_mention event handler too.

Thanks for the clarification. I think I get your point. :)

@seratch seratch added the invalid This doesn't seem right label Jan 10, 2024
@seratch
Copy link
Owner

seratch commented Jan 10, 2024

It seems this not relevant. Let me close this PR. Thank you for your time and efforts on this!

@seratch seratch closed this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants