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
- チェーン用のこのオブジェクト。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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"]]