Class ChatSpaceDataSource
CzatSpaceDaneŹródło
Źródło danych, które wypełnia pokoje Google Chat jako elementy do wyboru w menu wyboru wielokrotnego. Wypełnia tylko pokoje, w których użytkownik jest członkiem.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
Dostępne tylko w przypadku aplikacji Google Chat. Niedostępne w przypadku dodatków Google Workspace.
Szczegółowa dokumentacja
setDefaultToCurrentSpace(defaultToCurrentSpace)
Jeśli ustawisz wartość true
, menu wielokrotnego wybierania domyślnie wybierze bieżący pokój Google Chat jako element.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
Dostępne tylko w przypadku aplikacji Google Chat. Niedostępne w przypadku dodatków Google Workspace.
Parametry
Nazwa | Typ | Opis |
defaultToCurrentSpace | Boolean | Wartość logiczna do ustawienia. |
Powrót
ChatSpaceDataSource
– ten obiekt do łańcucha.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-01-30 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]