Skip to content

Conversation

@ishanrajsingh
Copy link
Contributor

@ishanrajsingh ishanrajsingh commented Jan 23, 2026

Issue: #132

Implemented private messaging commands !whisper and !w .
Updated server.js to:

  • Parse whisper commands.
  • Check if the target username exists and is online.
  • Send private messages only to the sender and the specified receiver.
  • Return an error message when the target user is not online.

Updated config.go to:

  • Add PrivMsgColor field to the Config struct.
  • Add PrivMsgColor to all 15 theme presets.

Updated styles.go to:

  • Add a dedicated PrivMsg style for rendering private messages in a distinct color.
  • Updated tui_model.go to:
  • Extend ChatMessage struct with IsPrivate flag.
  • Detect private messages using the privately said: pattern inside parseMessage().
  • Render private messages in a different color inside renderMessages().

Updated theme.conf to:

  • Add PRIV_MESSAGE color configuration for private message styling.

Tested locally using three clients to verify correct private routing and color rendering.

Screen-Recording.12.mp4
image image image image

@OpenGitBot
Copy link

Hey @ishanrajsingh

PR Template is not followed. Kindly follow the template & edit it again for consideration as a valid pull request.

Thanks for contributing in OpenCode'25 ✨✨!

Correct Tempelate:
Issue : #<Issue_Number>

@OpenGitBot
Copy link

Hey @ishanrajsingh

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 @ishanrajsingh , does the privmessage not apply to the entire message sent as a whisper?

@ishanrajsingh
Copy link
Contributor Author

ishanrajsingh commented Jan 24, 2026

@Washiki
No, the private message styling is applied to the entire whisper message, not just a prefix.

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