Skip to content

Commit 7a38ba7

Browse files
author
pierrick
committed
improve indentation
1 parent e6a75f3 commit 7a38ba7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

solutions/webhook-chat-app/thread-reply.gs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ function webhook() {
2323
"headers": {"Content-Type": "application/json; charset=UTF-8"},
2424
"payload": JSON.stringify({
2525
"text": "Hello from Apps Script!",
26-
"thread": {"threadKey": "THREAD_KEY_VALUE"}
26+
"thread": {
27+
"threadKey": "THREAD_KEY_VALUE"
28+
}
2729
})
2830
};
2931
const response = UrlFetchApp.fetch(url, options);

solutions/webhook-chat-app/webhook.gs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717

1818
// [START chat_webhook]
1919
function webhook() {
20-
const url = "https://chat.googleapis.com/v1/spaces/SPACE_ID/messages"
20+
const url = "https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKEN"
2121
const options = {
2222
"method": "post",
2323
"headers": {"Content-Type": "application/json; charset=UTF-8"},
24-
"payload": JSON.stringify({"text": "Hello from Apps Script!"})
24+
"payload": JSON.stringify({
25+
"text": "Hello from Apps Script!"
26+
})
2527
};
2628
const response = UrlFetchApp.fetch(url, options);
2729
console.log(response);

0 commit comments

Comments
 (0)