fix: AI message dismiss button by ankitsmt211 · Pull Request #1403 · Together-Java/TJ-Bot

@ankitsmt211

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 self-assigned this

Jan 30, 2026

tj-wazei

Zabuzard

Zabuzard

@ankitsmt211

* 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

tj-wazei

Zabuzard