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
.build();
private final ComponentIdInteractor componentIdInteractor =
new ComponentIdInteractor(getInteractionType(), getName());
private static final int FIRST_MESSAGE_ONLY = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

The naming is a bit off and perhaps something you would give to a boolean. Instead, let's rename this to NUMBER_OF_MESSAGES + some additional context.

ThreadChannel channel = event.getChannel().asThreadChannel();
Member interactionUser = Objects.requireNonNull(event.getMember());

Consumer<Throwable> handleParentMessageDeleted = error -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can extract this as it's own function as opposed to defining it like this.

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

2 participants