Skip to content

fix(channels): annotate DM messages with sender identity#120

Merged
viettranx merged 2 commits intonextlevelbuilder:mainfrom
Luvu182:fix/dm-sender-identity
Mar 10, 2026
Merged

fix(channels): annotate DM messages with sender identity#120
viettranx merged 2 commits intonextlevelbuilder:mainfrom
Luvu182:fix/dm-sender-identity

Conversation

@Luvu182
Copy link
Contributor

@Luvu182 Luvu182 commented Mar 10, 2026

Summary

  • Telegram and Zalo group messages already include [From: sender] prefix so the agent knows who is talking, but DM messages were sent without any sender context — the agent had no way to address the user by name
  • Telegram DM: add [From: @username] (or FirstName if no username), reusing the existing senderLabel already computed for groups
  • Zalo DM: add [From: displayName] when dName is present in the WebSocket payload (verified: Zalo does send dName for DMs)

Test plan

  • Verified Telegram DM: [From: @luanvuseo] appears in session messages
  • Verified Zalo DM: [From: Luân Vũ Mkt] appears in session messages
  • Verified Zalo group: existing [From: sender] still works
  • No impact on group message flow (groups already had this annotation)

🤖 Generated with Claude Code

Luvu182 added 2 commits March 10, 2026 19:15
Telegram and Zalo group messages already include [From: sender] prefix
so the agent knows who is talking, but DM messages were sent without
any sender context — the agent had no way to address the user by name.

- Telegram DM: add [From: @username] (or FirstName if no username)
- Zalo DM: add [From: displayName] when dName is present in payload
AgentStore interface gained EnsureUserProfile in 4fce731 but the test
stub implementations were not updated, breaking CI on main.
@Luvu182 Luvu182 force-pushed the fix/dm-sender-identity branch from 36ba1cb to 08070e2 Compare March 10, 2026 12:17
@viettranx viettranx merged commit a4f2d02 into nextlevelbuilder:main Mar 10, 2026
2 checks passed
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