Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Class ChatSpaceDataSource
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
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 ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-04-13 (שעון UTC).
[null,null,["עדכון אחרון: 2026-04-13 (שעון UTC)."],[],["`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"]]