mirror of
https://github.com/nightly-labs/openbot.git
synced 2026-11-24 01:55:09 +08:00
* Tell an unlinked Telegram chat how to link it A Telegram chat that adds the shared OpenBot bot without the one-use link from the app has no route, so Signal discarded each update with no reply. A user who mentioned the bot got silence and no hint. Signal now sends one notice in such a chat when a direct message, a mention or a command arrives and the account service answers that no host has the chat. The text comes from the new status.messaging.telegramNotLinked key and names the app path: Marketplace > Apps > Telegram > Add to a group or Open a direct chat. - The notice is sent only on a real lookup answer with hostId null. A failed lookup, a chat linked to an offline host, a chat that a link just routed, replies, threads, renames, leaves and button presses get none. - At most one notice per chat per 24 hours, in a bounded in-memory map. The time is kept before the call, a failure is not retried or logged, and the call has no reply or thread parameters. - A link now forgets the cached "no host" lookup of its chat. - Slack still answers 503 for a team with no host. - remote/api depends on @openbot/i18n, and the Dockerfile copies it. - TELEGRAM_TEST_API_ORIGIN (loopback only) points Signal at a fake Bot API in scripts/signal-security-e2e.ts, which checks the notice cases. Fixes #11875 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the Telegram notice out of chats that Signal saw linked - Skip the notice for a chat that this Signal saw linked, revoked or named in a route ticket. A lookup that started before a link and answered after it can no longer send the notice. - Ignore a TELEGRAM_TEST_API_ORIGIN that is not a loopback address, instead of turning off Telegram. - In the Signal E2E, wait for the notice of a later chat before the count, so that a second notice cannot come after the assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
682 B
JSON
28 lines
682 B
JSON
{
|
|
"name": "@openbot/remote-api",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "bun --watch src/index.ts",
|
|
"start": "bun src/index.ts",
|
|
"typecheck": "bun ../../scripts/type-checker.ts --noEmit -p tsconfig.json",
|
|
"check": "bun run typecheck"
|
|
},
|
|
"dependencies": {
|
|
"@discordjs/rest": "2.6.3",
|
|
"@discordjs/ws": "2.0.4",
|
|
"@openbot/contracts": "workspace:*",
|
|
"@openbot/i18n": "workspace:*",
|
|
"discord-api-types": "0.38.57",
|
|
"effect": "catalog:",
|
|
"elysia": "1.4.30",
|
|
"jose": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "1.4.4",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|