openclaw - ✅(Solved) Fix Google Chat: markdown renders as raw text; typing indicator says 'OpenClaw is typing' instead of app name [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#49350Fetched 2026-04-08 00:56:10
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
referenced ×3cross-referenced ×2commented ×1subscribed ×1

Fix Action

Fixed

PR fix notes

PR #49361: fix(googlechat): use agent identity.name in typing indicator fallback chain

Description (problem / solution / changelog)

Problem

Closes #49350

When a Google Chat agent has identity.name configured but no direct agent.name, the typing indicator was falling back to the hardcoded "OpenClaw is typing..." string instead of the configured identity name.

Root Cause

resolveBotDisplayName in extensions/googlechat/src/monitor.ts has a 3-step fallback chain:

  1. Account config name (account.config.name)
  2. Agent name (agent.name)
  3. ❌ Hardcoded "OpenClaw"

It was missing a check for agent.identity?.name, which is the standard way users configure bot identity in OpenClaw (IdentityConfig.name).

Fix

Add agent.identity?.name as a third fallback before the hardcoded "OpenClaw" string.

Updated fallback chain:

  1. Account config name (account.config.name)
  2. Agent name (agent.name)
  3. ✅ Agent identity name (agent.identity?.name) ← new
  4. "OpenClaw" as last resort

Example

Config:

{
  "agents": {
    "list": [{
      "id": "main",
      "identity": { "name": "Alvin" }
    }]
  }
}

Before: Shows _OpenClaw is typing..._ After: Shows _Alvin is typing..._

Changes

  • extensions/googlechat/src/monitor.ts: Added agent?.identity?.name check in resolveBotDisplayName (5 lines)
  • Updated JSDoc comment to reflect the 4-step fallback chain

Changed files

  • extensions/googlechat/src/monitor.ts (modified, +5/-1)

PR #49406: fix(googlechat): strip markdown before sending messages

Description (problem / solution / changelog)

Summary

Fixes #49350 - Google Chat messages were displaying markdown syntax literally instead of being rendered.

Problem

Google Chat does not support markdown formatting. Previously, messages containing markdown (bold, italic, headers, code blocks, etc.) were sent as raw text, displaying the markdown syntax literally to users.

Solution

Strip markdown formatting before sending messages to Google Chat:

  • Export stripMarkdown function from plugin-sdk/googlechat
  • Strip markdown in deliverGoogleChatReply (monitor.ts) for inbound replies
  • Strip markdown in outbound sendText/sendMedia (channel.ts)
  • Update test mocks to include stripMarkdown

Changes

FileChange
src/plugin-sdk/googlechat.tsExport stripMarkdown function
extensions/googlechat/src/monitor.tsStrip markdown before sending messages
extensions/googlechat/src/channel.tsStrip markdown in outbound sendText/sendMedia
extensions/googlechat/src/resolve-target.test.tsAdd mock for stripMarkdown

Testing

  • All 38 existing tests pass
  • No new tests added (behavior change only, stripMarkdown is already tested elsewhere)

Note on Typing Indicator Name

Issue #49350 also mentioned the typing indicator showing "OpenClaw" instead of the configured name. This is a configuration issue, not a bug. Users can customize the display name by setting:

{
  "channels": {
    "googlechat": {
      "name": "YourBotName"
    }
  }
}

Or via agent configuration:

{
  "agents": {
    "list": [{ "id": "main", "name": "YourBotName" }]
  }
}

Changed files

  • extensions/googlechat/runtime-api.ts (modified, +2/-0)
  • extensions/googlechat/src/channel.ts (modified, +6/-2)
  • extensions/googlechat/src/monitor.ts (modified, +10/-4)
  • extensions/googlechat/src/resolve-target.test.ts (modified, +1/-0)
  • src/line/markdown-to-line.ts (modified, +23/-3)
  • src/plugin-sdk/googlechat.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Issues with Google Chat integration

Two UX issues in the Google Chat channel:

1. Markdown formatting not stripped Responses containing markdown (bold, headers, etc.) render as raw asterisks/symbols in Google Chat since it doesn't support markdown. The channel adapter should strip or convert markdown to plain text before sending.

2. Typing indicator shows 'OpenClaw is typing' instead of configured agent name The typing indicator text is hardcoded as 'OpenClaw is typing...' rather than using the configured agent identity name (e.g. 'Alvin'). It should reflect the agent name set in config.

Both issues affect the Google Chat channel only.

extent analysis

Fix Plan

To address the issues with the Google Chat integration, we will:

  • Strip markdown formatting from responses before sending to Google Chat
  • Update the typing indicator to use the configured agent name

Code Changes

Strip Markdown Formatting

import re

def strip_markdown(text):
    # Remove markdown bold and italic formatting
    text = re.sub(r'(\*|_)(.*?)\1', lambda m: m.group(2), text)
    # Remove markdown headers
    text = re.sub(r'^#{1,6} ', '', text, flags=re.MULTILINE)
    return text

# Example usage:
response_text = "**Hello** _world_"
stripped_text = strip_markdown(response_text)
print(stripped_text)  # Output: "Hello world"

Update Typing Indicator

def get_typing_indicator(agent_name):
    return f'{agent_name} is typing...'

# Example usage:
agent_name = 'Alvin'
typing_indicator = get_typing_indicator(agent_name)
print(typing_indicator)  # Output: "Alvin is typing..."

Configuration Changes

  • Ensure the agent_name is properly configured and passed to the get_typing_indicator function

Verification

  • Test the Google Chat integration with markdown-formatted responses to verify that formatting is stripped
  • Verify that the typing indicator displays the correct agent name

Extra Tips

  • Consider using a dedicated markdown parsing library for more robust formatting removal
  • Ensure that the agent_name configuration is properly validated and handled for edge cases (e.g. empty or null values)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING