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
– האובייקט הזה, לצורך שרשור.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]