mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 12:31:23 +00:00
fix: refine telegram reactions (#964) (thanks @bohdanpodvirnyi)
This commit is contained in:
11
src/telegram/allowed-updates.ts
Normal file
11
src/telegram/allowed-updates.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { API_CONSTANTS } from "grammy";
|
||||
|
||||
type TelegramUpdateType = (typeof API_CONSTANTS.ALL_UPDATE_TYPES)[number];
|
||||
|
||||
export function resolveTelegramAllowedUpdates(): ReadonlyArray<TelegramUpdateType> {
|
||||
const updates = [...API_CONSTANTS.DEFAULT_UPDATE_TYPES] as TelegramUpdateType[];
|
||||
if (!updates.includes("message_reaction")) {
|
||||
updates.push("message_reaction");
|
||||
}
|
||||
return updates;
|
||||
}
|
||||
Reference in New Issue
Block a user