Skip to content

Issue #1 - [BUG] Empty messages sent with whitespace characters #5

@zenocross

Description

@zenocross

Description

Users can currently send messages containing only whitespace characters (spaces, tabs, newlines), which creates empty-looking messages in the chat.

Current Behavior

  • Messages with only whitespace are accepted
  • Empty-looking messages appear in chat history
  • Wastes space and degrades chat experience

Expected Behavior

Input should be trimmed before validation, preventing submission of whitespace-only messages.

Steps to Reproduce

  1. Open chat input
  2. Type multiple spaces or press spacebar/tab repeatedly
  3. Press send
  4. Empty message appears in chat

Proposed Solution

Trim input message using .trim() before checking if it's empty.


Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions