New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@opentag/telegram

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentag/telegram

Telegram message normalization and callback helpers for OpenTag.

npmnpm
Version
0.6.0
Version published
Weekly downloads
21
75%
Maintainers
2
Weekly downloads
 
Created
Source

@opentag/telegram

Telegram message normalization and callback helpers for OpenTag.

Use this package to normalize Telegram bot messages into OpenTagEvent objects and to encode or parse Telegram callback thread keys.

Install

pnpm add @opentag/telegram

Exports

  • normalizeTelegramMessage: converts a Telegram message into an OpenTagEvent.
  • encodeTelegramThreadKey: encodes bot, chat, and message coordinates for callback routing.
  • parseTelegramThreadKey: decodes a Telegram callback thread key.
  • renderTelegramAcknowledgement: renders the Telegram acknowledgement body.
  • renderTelegramFinalResult: renders the Telegram final result body.
  • createTelegramSendMessagePayload: creates a Telegram Bot API sendMessage payload.

Example

import { normalizeTelegramMessage } from "@opentag/telegram";

const event = normalizeTelegramMessage({
  botId: "bot_123",
  botUsername: "opentag_bot",
  chatId: "456",
  chatType: "private",
  userId: "789",
  username: "alice",
  text: "investigate this deploy failure",
  messageId: 101,
  updateId: 202,
  binding: {
    botId: "bot_123",
    chatId: "456",
    repoProvider: "github",
    owner: "acme",
    repo: "demo"
  }
});

if (event) {
  // Send the event to @opentag/client or your own OpenTag-compatible control plane.
}

Stability

Telegram thread key format is public because callback sinks depend on it. Change it only with a migration path.

Keywords

opentag

FAQs

Package last updated on 15 Jul 2026

Related posts