Class ChatSpaceDataSource
แหล่งข้อมูลข้อมูลแชทในพื้นที่ทำงาน
แหล่งข้อมูลที่ป้อนข้อมูลพื้นที่ใน Google Chat เป็นรายการตัวเลือกสำหรับเมนูแบบเลือกหลายรายการ แสดงเฉพาะพื้นที่ทำงานที่ผู้ใช้เป็นสมาชิก
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
ใช้ได้กับแอป Google Chat เท่านั้น ไม่พร้อมใช้งานสำหรับส่วนเสริมของ Google Workspace
เอกสารประกอบโดยละเอียด
setDefaultToCurrentSpace(defaultToCurrentSpace)
หากตั้งค่าเป็น true
เมนูการเลือกหลายรายการจะเลือกพื้นที่ทำงาน Google Chat ปัจจุบันเป็นรายการโดยค่าเริ่มต้น
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
ใช้ได้กับแอป Google Chat เท่านั้น ไม่พร้อมใช้งานสำหรับส่วนเสริมของ Google Workspace
พารามิเตอร์
ชื่อ | ประเภท | คำอธิบาย |
defaultToCurrentSpace | Boolean | ค่าบูลีนที่จะตั้งค่า |
รีเทิร์น
ChatSpaceDataSource
— ออบเจ็กต์นี้สําหรับการต่อเชื่อม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-01-30 UTC
[null,null,["อัปเดตล่าสุด 2025-01-30 UTC"],[[["ChatSpaceDataSource populates Google Chat spaces as selection items in a multiselect menu, limited to spaces the user has joined."],["It's exclusively for Google Chat apps and unavailable for Google Workspace Add-ons."],["This data source can be configured to default to the current Chat space as a selected item in the menu."]]],["`ChatSpaceDataSource` populates a multiselect menu with Google Chat spaces the user belongs to. `setDefaultToCurrentSpace(true)` sets the current Chat space as the default selection in the menu. This functionality is exclusively for Google Chat apps, not Google Workspace add-ons. The `setDefaultToCurrentSpace` method takes a boolean as input and returns the `ChatSpaceDataSource` object. `newChatSpaceDataSource()` is used to create the object.\n"]]