-
Notifications
You must be signed in to change notification settings - Fork 4
fix: SenderName/WasMentioned missing in DMWork adapter inbound context #142
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
DMWork adapter only sets SenderId: message.from_uid in finalizeInboundContext. The AI has no idea who is talking — it only sees a raw UID.
Missing OpenClaw SDK fields
SenderName— display nameSenderUsername— username fallbackWasMentioned— framework can't gate elevated/exec permissions properly
Root cause
WuKongIM RECV binary protocol only pushes from_uid, no sender name. The adapter had uidToNameMap available from group member cache but never used it to populate these fields.
Additional issues found
- Reply
from_nameand MultipleForwardusers[].namedata was received but not cached - Group members not preloaded on startup (empty uidToNameMap until first group message)
cleanupStaleCachesbug:_uidToNameMaps.delete(groupId)on flat uid→name map- DM cross-space users unresolvable (different uid prefix per space)
Fix
PR #141 addresses all issues above.
Remaining gap
Pure DM users (never appeared in any group) need backend /v1/bot/user/info API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working