Skip to content

feat: attribute chat-cli group messages to their sender - #211

Open
mchenani wants to merge 5 commits into
mainfrom
mch/libchat-refactoring-sender-attribution
Open

feat: attribute chat-cli group messages to their sender#211
mchenani wants to merge 5 commits into
mainfrom
mch/libchat-refactoring-sender-attribution

Conversation

@mchenani

Copy link
Copy Markdown
Contributor

No description provided.

@jazzz jazzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread bin/chat-cli/src/app.rs
/// Short label of the sender for an incoming message (`None` for our own
/// messages and system output). Used to attribute messages in groups.
#[serde(default)]
pub sender: Option<String>,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Dust] No issue on a test app, but I would choose a dedicated enum rather than Option\<String\> for encoding this context.

  • Encoding self as None requires an understanding of the type.
  • It's Ambiguous how to handle system notifications (Member Added, Description updated etc)

enum MessageOrigin { Self, Foreign(ShortAccountAddr) } leaves room for expansion to System, SelfOtherDevice etc, etc..

Base automatically changed from mch/libchat-refactoring-members-list to main August 19, 2026 14:06
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.

2 participants