docs(matrix-bot-common): document bot-to-bot loop prevention

Added documentation for the isBot() method and automatic bot message
filtering that prevents infinite loops when multiple bots share a room.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-14 14:05:34 +01:00
parent 97264cd849
commit 43ac782892

View file

@ -67,6 +67,11 @@ export class MyBotService extends BaseMatrixService {
- `sendNotice(roomId, message)` - Non-highlighted message
- `downloadMedia(mxcUrl)` - Download from Matrix
- `uploadMedia(buffer, contentType, filename)` - Upload to Matrix
- `isBot(sender)` - Check if sender is a bot (prevents bot-to-bot loops)
**Bot-to-Bot Loop Prevention:**
The base class automatically ignores messages from other bots to prevent infinite message loops when multiple bots are in the same room. A sender is considered a bot if their Matrix ID localpart contains `-bot` or ends with `bot` (e.g., `@mana-bot:server`, `@todobot:server`).
### HealthController