Skip to content

Commit 42271f5

Browse files
fix: update stale messenger_type strings after chat-system migration
- streaming.rs: Change 'teams' to 'msteams' and 'google_chat' to 'googlechat' in recommended_strategy() to match chat-system's messenger_type() return values. Without this fix, Teams and Google Chat fall through to the default BufferAll strategy instead of the intended EditInPlace strategy. - messenger_handler.rs: Add 'msteams' and 'googlechat' arms to get_platform_formatting_guide() so Teams and Google Chat messages get platform-specific formatting guidance instead of the generic default. Co-Authored-By: Erica Stith <rexlunae@gmail.com>
1 parent e66b5d3 commit 42271f5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

crates/rustyclaw-core/src/gateway/messenger_handler.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,22 @@ fn get_platform_formatting_guide(messenger_type: &str) -> String {
10081008
- Links: <https://url|display text>\n\
10091009
- Use emoji reactions when appropriate".to_string(),
10101010

1011+
"msteams" => "\
1012+
### Formatting (Microsoft Teams)\n\
1013+
- **Markdown supported**: bold, italic, code, links, lists\n\
1014+
- Tables render in Teams clients\n\
1015+
- Code blocks with syntax highlighting\n\
1016+
- Adaptive Cards supported for rich content\n\
1017+
- Keep messages concise for readability".to_string(),
1018+
1019+
"googlechat" => "\
1020+
### Formatting (Google Chat)\n\
1021+
- **Basic markdown**: bold, italic, code, links\n\
1022+
- **NO tables** — use bullet lists instead\n\
1023+
- Code blocks supported\n\
1024+
- Thread replies supported — prefer threading for related messages\n\
1025+
- Keep messages concise".to_string(),
1026+
10111027
"signal" => "\
10121028
### Formatting (Signal)\n\
10131029
- **NO formatting support** — plain text only\n\

crates/rustyclaw-core/src/messengers/streaming.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ pub fn recommended_strategy(messenger_type: &str) -> StreamStrategy {
270270
match messenger_type {
271271
"telegram" | "discord" | "slack" => StreamStrategy::EditInPlace,
272272
"irc" | "webhook" => StreamStrategy::Chunked,
273-
"teams" | "google_chat" => StreamStrategy::EditInPlace,
273+
"msteams" | "googlechat" => StreamStrategy::EditInPlace,
274274
"imessage" => StreamStrategy::BufferAll,
275275
_ => StreamStrategy::BufferAll,
276276
}

0 commit comments

Comments
 (0)