Class ChatSpaceDataSource
ChatGruppeDatenquelle
Eine Datenquelle, die Google Chat-Gruppenbereiche als Auswahlelemente für ein Mehrfachauswahlmenü enthält. Es werden nur Gruppenbereiche angezeigt, in denen der Nutzer Mitglied ist.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
Nur für Google Chat-Apps verfügbar. Nicht verfügbar für Google Workspace-Add-ons.
Detaillierte Dokumentation
setDefaultToCurrentSpace(defaultToCurrentSpace)
Wenn Sie true
festlegen, wird im Menü für die Mehrfachauswahl standardmäßig der aktuelle Google Chat-Bereich ausgewählt.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
Nur für Google Chat-Apps verfügbar. Nicht verfügbar für Google Workspace-Add-ons.
Parameter
Name | Typ | Beschreibung |
defaultToCurrentSpace | Boolean | Der zu setzende boolesche Wert. |
Rückflug
ChatSpaceDataSource
– dieses Objekt, zur Verkettung
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-01-30 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]