Class ChatSpaceDataSource
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
-
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.
A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of.
constchatSpaceDataSource= CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
Only available for Google Chat apps. Not available for Google Workspace add-ons.
Methods
| Method | Return type | Brief description |
|---|---|---|
set | Chat | If set to true, the multi select menu selects the current Google Chat space as an item
by default. |
Detailed documentation
setDefaultToCurrentSpace(defaultToCurrentSpace)
If set to true, the multi select menu selects the current Google Chat space as an item
by default.
constchatSpaceDataSource= CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
Parameters
| Name | Type | Description |
|---|---|---|
default | Boolean | The boolean to be set. |
Return
Chat — This object, for chaining.