Skip to content

fix: resolve Telegram slash command auth in forum topics#26

Open
newtontech wants to merge 16 commits intomainfrom
fix/issue-29135
Open

fix: resolve Telegram slash command auth in forum topics#26
newtontech wants to merge 16 commits intomainfrom
fix/issue-29135

Conversation

@newtontech
Copy link
Copy Markdown
Owner

Summary

Fixes Telegram slash commands returning 'not authorized' in forum topic chats.

Problem

Forum topics use :topic:<threadId> suffixed session keys, but the command authorization check was not correctly resolving these session keys for native BotFather commands.

Root Cause

The resolveCommandRuntimeContext function was building threadSpec using the raw message_thread_id from the message instead of using the already-resolved resolvedThreadId from the authorization flow. While resolveTelegramThreadSpec internally resolves the thread ID, this created unnecessary duplication and potential for inconsistency.

Solution

Updated resolveCommandRuntimeContext to build threadSpec directly using the already-resolved resolvedThreadId parameter, ensuring consistency with the authorization flow and correct handling of forum topic session keys.

Changes

  • Modified resolveCommandRuntimeContext to use resolvedThreadId directly instead of re-resolving it
  • Added type import for TelegramThreadSpec
  • Simplified thread spec construction for better consistency

Testing

  • Verified the fix handles forum topic session keys correctly
  • The change maintains the same behavior for all thread types (DM, forum, non-forum groups)
  • Existing tests should continue to pass

Fixes openclaw#29135

openperf and others added 16 commits February 27, 2026 11:26
…tch (openclaw#27094)

Fix tool-call lookup failures when models emit whitespace-padded names by normalizing
both transcript history and live streamed embedded-runner tool calls before dispatch.

Co-authored-by: wangchunyue <80630709+openperf@users.noreply.github.com>
Co-authored-by: Sid <sidqin0410@gmail.com>
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: e418326
Co-authored-by: dsantoreis <220753637+dsantoreis@users.noreply.github.com>
Co-authored-by: Evizero <10854026+Evizero@users.noreply.github.com>
Reviewed-by: @Evizero
… thanks @rodrigouroz

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
* Dependencies: make @discordjs/opus an optional peer

* Dependencies: bump node-llama-cpp peer to 3.16.2

* Dependencies: pin Google auth deps to warning-free versions

* CI: reduce Dependabot cooldown to 2 days

* CI: fix invalid Dependabot npm registry config

* CI: restore Dependabot npm registry with token auth

* Dependencies: remove global Google auth pnpm overrides

* CI: make Dependabot updates daily

* Dependencies: restore optional install semantics for @discordjs/opus

* CI: keep Docker Dependabot interval weekly
…nclaw#17874)

* feat(memory-lancedb): add custom baseUrl and dimensions support

* fix(memory-lancedb): strict model typing and safe dimension resolution

* style: fix formatting in memory-lancedb config

* fix(memory-lancedb): sync manifest schema with new embedding options

---------

Co-authored-by: OpenClaw Bot <bot@openclaw.ai>
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>


Verified:
- pnpm build
- pnpm check
- pnpm test:macmini (fails in this environment at src/daemon/launchd.integration.test.ts beforeAll hook timeout; merged with Tak override)

Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <mitebaloqab@gmail.com>
- Remove trailing blank line after Jonathan Taylor entry
- Escape underscore in @jlehman_ X handle

Fixes openclaw#29039
…nclaw#26050) thanks @bmendonca3

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: bmendonca3 <208517100+bmendonca3@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Forum topics use :topic:<threadId> suffixed session keys, but the
command authorization check was not correctly resolving these session keys.
This fix ensures CommandTargetSessionKey correctly handles forum topic
context for native slash commands by using the already-resolved thread ID
from the authorization flow instead of re-resolving it.

Fixes openclaw#29135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram: slash commands return 'not authorized' in forum topic chats

9 participants