Skip to content

Conversation

@Krishna200608
Copy link
Contributor

Issue: #132

Features Implemented

Implemented private messaging with whisper commands for direct user-to-user communication.

Server Changes (server.js)

  • Added command parsing for !whisper <user> <msg> and !w <user> <msg>
  • Private messages sent only to sender and receiver
  • Error response: "Sorry, that user is not online!" if target not found

Client Changes

  • config.go: Added PrivMsgColor to Config struct and all 15 theme presets
  • styles.go: Added PrivMsg style for private message rendering
  • tui_model.go:
    • Added IsPrivate field to ChatMessage struct
    • Updated parseMessage() to detect "privately said:" format
    • Updated renderMessages() to show [WHISPER] label in distinct color
  • theme.conf: Added PRIV_MESSAGE key for custom color override

Visual

  • Private messages display with [WHISPER] prefix in theme-specific color (pink/purple variants)
  • Welcome message now shows username in theme accent color

Usage

  • !whisper username message !w username message

Submission Requirements

  • All changes logged in documentation.md
  • Private messages shown in different color (PRIV_MESSAGE in theme.conf)
  • Video demonstration with 3+ clients (attached below)

Demo

Video

19.mp4

Theme Color (Can override by uncommenting)

image

If user not online (Not found)

image

@OpenGitBot
Copy link

Hey @Krishna200608

Thanks for opening this PR 🚀. Mentor will review your pull request soon and till then, keep contributing and stay calm.

Thanks for contributing in OpenCode'25 ✨✨!

@Washiki
Copy link
Collaborator

Washiki commented Jan 24, 2026

Yellow @Krishna200608
seems like the messages are being cut off? could you correct for that?

@Krishna200608
Copy link
Contributor Author

Yellow @Krishna200608 seems like the messages are being cut off? could you correct for that?

I'll Check, will get back to you soon with correct fixes.

@Krishna200608
Copy link
Contributor Author

Krishna200608 commented Jan 24, 2026

Yellow! @Washiki
I've just pushed a fix so long messages wrap correctly to the next line instead of getting cut off. Should be all good now!.

24.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants