Skip to content

Whisper messages may echo back to bot when using only_chat_with #739

@hakaru

Description

@hakaru

When only_chat_with is configured, openChat sends messages via bot.whisper() (L417-420). However, bot.on('whisper', respondFunc) (L182) can receive these whispers back, depending on the server implementation. While username === this.name filtering exists (L159), the behavior of whisper events varies across server implementations, and in some environments this creates a feedback loop where the bot responds to its own messages.

The developer appears to be aware of this edge case — there is a console.warn('received whisper from other bot??') in the code (L169) — but no guard specifically prevents self-whisper echo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions