fix: clarify gog-based google chat setup
This commit is contained in:
parent
e4591ca120
commit
abe242a3bb
@ -57,6 +57,7 @@ If you already use `gog` for Google Workspace, you can reuse its OAuth client +
|
||||
```bash
|
||||
gog auth credentials /path/to/client_secret.json
|
||||
gog auth add you@example.com --services gmail,calendar,drive,contacts,docs,sheets
|
||||
gog auth list
|
||||
```
|
||||
2) Configure Google Chat to reuse `gog`:
|
||||
```json5
|
||||
@ -74,6 +75,11 @@ If you already use `gog` for Google Workspace, you can reuse its OAuth client +
|
||||
3) Ensure `gog` can access its keyring on the gateway host.
|
||||
- `gog` stores refresh tokens in the system keychain by default. citeturn6view0
|
||||
- For headless systems, switch to file keyring + password (see `gog` docs). citeturn6view0
|
||||
4) Verify `gog` is visible to the gateway user:
|
||||
```bash
|
||||
gog auth tokens --json
|
||||
```
|
||||
If this fails, install `gog` on the gateway host and ensure the keyring is accessible.
|
||||
|
||||
Clawdbot reads `gog` OAuth client files from:
|
||||
- `~/.config/gogcli/credentials.json`
|
||||
|
||||
@ -167,6 +167,12 @@ export const googlechatPlugin: ChannelPlugin<ResolvedGoogleChatAccount> = {
|
||||
],
|
||||
}),
|
||||
isConfigured: (account) => account.credentialSource !== "none",
|
||||
unconfiguredReason: (account) => {
|
||||
if (account.config.oauthFromGog) {
|
||||
return "Google Chat OAuth from gog is enabled but no gog credentials were found. Ensure gog is installed, the gateway can access its keyring, or set oauthRefreshToken/oauthClientFile.";
|
||||
}
|
||||
return "Google Chat credentials are missing. Configure a service account or user OAuth.";
|
||||
},
|
||||
describeAccount: (account) => ({
|
||||
accountId: account.accountId,
|
||||
name: account.name,
|
||||
|
||||
@ -648,7 +648,7 @@ async function processMessageWithPipeline(params: {
|
||||
let typingIndicator = account.config.typingIndicator ?? "message";
|
||||
if (typingIndicator === "reaction" && account.userCredentialSource === "none") {
|
||||
runtime.error?.(
|
||||
`[${account.accountId}] typingIndicator="reaction" requires user OAuth (not supported with service account). Falling back to "message" mode.`,
|
||||
`[${account.accountId}] typingIndicator="reaction" requires user OAuth. Configure OAuth (or oauthFromGog) to enable reactions; falling back to "message" mode.`,
|
||||
);
|
||||
typingIndicator = "message";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user