Telegram binding times out; No messages sent/received

I’m running in to some issue where the Telegram bot times out if there is no activity for a period of a few hours. Usually this occurs while I’m sleeping. I’ll open a door, triggering a rule to send a message and I’ll never get it. But after a few minutes, try the door again and now things work once more.

Is there any way to “heartbeat” Telegram so that the connection stays active?

OH 3.2.0

06:53:30.951 [WARN ] [egram.internal.action.TelegramActions] - Exception occured whilst sending message:java.net.SocketTimeoutException: timeout

For now, until the binding get’s some more advanced monitoring features, I’m using this workaround rule to run every hour during the hours when I’m usually asleep:

const API_URL = "http://localhost:8080/rest/things/telegram:telegramBot:aaaaaaaa/enable";
var headers = {
  "WWW-Authenticate": "Basic",
  "Authorization": "Bearer XXXXX",
}

// Disable Telegram
actions.HTTP.sendHttpPutRequest(API_URL, "text/plain", 'false', headers, 5000);

// Enable 5s later
setTimeout(() => {
  actions.HTTP.sendHttpPutRequest(API_URL, "text/plain", 'true', headers, 5000);
}, 5000);