Skip to content

Conversation

@ankitsmt211
Copy link
Member

when message that created thread was deleted,
retrieveStartMessage() threw an error UNKNOWN_MESSAGE leading to non-functional dismiss button.

this adds a handler, specifically for parent message deleted error by using getIterableHistoryInstead.

resolves #1400

when message that created thread was deleted,
retrieveStartMessage() threw an error UNKNOWN_MESSAGE
leading to non-functional dismiss button.

this adds a handler, specifically for parent message
deleted error by using getIterableHistoryInstead.
@ankitsmt211 ankitsmt211 self-assigned this Jan 30, 2026
@ankitsmt211 ankitsmt211 requested a review from a team as a code owner January 30, 2026 19:12
@ankitsmt211 ankitsmt211 added bug Something isn't working priority: low labels Jan 30, 2026
* move AI dismiss fallback consumer to a seperate function for clarity
* move variable FIRST_MESSAGE_ONLY to function scope as noOfMessage for
  clarity
* improve error log message for clarity

private Consumer<Throwable> handleParentMessageDeleted(Member user, ThreadChannel channel,
ButtonInteractionEvent event, List<String> args) {
int noOfMessages = 1; // we only care about first message from channel history
Copy link
Contributor

Choose a reason for hiding this comment

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

this is fine though I'd personally would have just not bothered and did limit(1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dismiss AI message button doesn't work

3 participants