Skip to content

Commit 30293dc

Browse files
committed
[Telegram] Always remove callbackId regardless of result
Fixing Copilot finding regarding removement of the persisted callbackId #20659 (comment) Signed-off-by: Christoph <36006493+fd0cwp@users.noreply.github.com>
1 parent 0bf6989 commit 30293dc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • bundles/org.openhab.binding.telegram/src/main/java/org/openhab/binding/telegram/internal/action

bundles/org.openhab.binding.telegram/src/main/java/org/openhab/binding/telegram/internal/action/TelegramActions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ public String toString() {
183183

184184
boolean result = sendTelegramAnswer(chatId, callbackId, messageId != null ? Long.valueOf(messageId) : null,
185185
message);
186-
if (result && callbackId != null) {
186+
if (callbackId != null)
187+
{
187188
localHandler.removeCallbackId(chatId, replyId);
188189
logger.debug("remove callbackId for chatId {} and replyId {}", chatId, replyId);
189190
}

0 commit comments

Comments
 (0)