mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 06:14:34 +00:00
fix(telegram): restore thread_id=1 handling for DMs (regression from 19b8416a8) (openclaw#10942) thanks @garnetlyx
Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm test:macmini Co-authored-by: garnetlyx <12513503+garnetlyx@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -169,7 +169,7 @@ describe("deliverReplies", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps message_thread_id=1 when allowed", async () => {
|
||||
it("does not include message_thread_id for DMs (threads don't exist in private chats)", async () => {
|
||||
const runtime = { error: vi.fn(), log: vi.fn() };
|
||||
const sendMessage = vi.fn().mockResolvedValue({
|
||||
message_id: 4,
|
||||
@@ -191,7 +191,7 @@ describe("deliverReplies", () => {
|
||||
expect(sendMessage).toHaveBeenCalledWith(
|
||||
"123",
|
||||
expect.any(String),
|
||||
expect.objectContaining({
|
||||
expect.not.objectContaining({
|
||||
message_thread_id: 1,
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user