fix(googlechat): land #30965 thread reply option support (@novan)

Landed from contributor PR #30965 by @novan.

Co-authored-by: novan <novan@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-03-02 03:16:48 +00:00
parent 355b4c62bc
commit cdbed3c9b1
3 changed files with 54 additions and 2 deletions

View File

@@ -128,7 +128,11 @@ export async function sendGoogleChatMessage(params: {
...(item.contentName ? { contentName: item.contentName } : {}),
}));
}
const url = `${CHAT_API_BASE}/${space}/messages`;
const urlObj = new URL(`${CHAT_API_BASE}/${space}/messages`);
if (thread) {
urlObj.searchParams.set("messageReplyOption", "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD");
}
const url = urlObj.toString();
const result = await fetchJson<{ name?: string }>(account, url, {
method: "POST",
body: JSON.stringify(body),