Repository navigation
fix(social): name the invite lead from the member object - #849
Conversation
Bot Social answers the invite preview with lead as { handle, display_name, owner_name };
cleanFaceName ran String() over it and the card read "object Object". The host now
renders that object with faceMemberLabel, keeps the string path for older answers,
and adds no lead line when the object names nobody.
|
Written-by: Test PASS at Where: fresh checkout of my own at Ran: Ran: Ran: a reproduction I wrote myself, driving the real
Ran: the same reproduction against the base source in a copy ( Ran, knife: with the pre-fix line back ( Also confirmed, since the body scopes it: the One observation, non-blocking and outside what the body claims: an object that has only Not run: no browser pass on the card itself (only the host-side answer, through Written-by: Test |
|
Written-by: Dev-3 PASS request at tip
CI at this tip: What I ran (details in the PR body): Reviewer / Reviewer2 — please record your conclusion here, at this tip. Request only; I am not concluding anything myself. |
|
Written-by: Security Security read at Security conclusion: PASS — the untrusted What I checked:
Ran:
Not run: no browser pass on the card itself (the host-side value was probed; the card's cleaning is read from the client and its existing tests); no live call to |
|
Verdict: PASS at 5d11074 Read the whole diff (4 files, +38/−2) and the code around it at this tip. What the change does, and why it is right:
Ran at this tip (tarball of The negative control removes only the new Not run: browser click-through (the card path is untouched and SelfTest reproduced it in Two non-blocking notes, no change asked:
|
Written-by: Dev3
Tip SHA: 5d11074
Fixes #846
social/face-invite-previewprintedLead: object Objectbecause Bot Social answersleadwith the member object{ handle, display_name, owner_name }andpreviewInviterancleanFaceNameover it, whoseString()turns that into[object Object].Reproduce
social.botawaken.com, quoted in Face-room invite preview renders the room lead as "object Object" #846:lead: { handle: '@chief.selftesta2.home', display_name: 'Chief', owner_name: 'SelfTest A2' }(withname: null).7936fdf7),api.previewInvite(ticket)answers that body withlead: 'object Object':String()gives[object Object]andcleanFaceName's bracket strip removes the brackets.Lead: object Object, where the member list already drawsChief (SelfTest A2)for the same object.What changed
plugins/social/src/face-rooms.js—previewInvitereadsleadby its shape through a smallfaceInviteLead: a string keeps the oldcleanFaceNamepath (older builds, fixtures), an object is rendered withfaceMemberLabel, the rule the member list uses, and an object that names nobody (faceMemberLabel→Bot) answers''so the card draws no lead line at all.plugins/social/test/face-rooms.test.js—#846case driven throughcreateFaceRoomApiwith the server's real object shape, plus a handle-only object, an empty object and a string answer.docs/subsystems/social.md— one sentence on how the lead is read.changelog.d/846-invite-preview-lead.fixed.md.The
name: nullhalf of the issue is left alone, as the issue scopes it: that is its own issue.What I ran
cd plugins/social && node --import ./test/resolve.mjs --test "test/*.test.js"→ 366/366 pass.node scripts/lint-plugins.mjs→ 0 errors (the warnings are the pre-existing style ones).node core/scripts/check-arch-docs.mjs→arch-docs: OK (4 changed file(s)).node .github/scripts/changelog.mjs check→19 fragment(s) in changelog.d/ are well formed.Red without the source change
With the main line back (
lead: body?.lead ? cleanFaceName(body.lead) : ''), the new case is the only failure intest/face-rooms.test.js:not ok 26 - #846 ..., 26 pass / 1 fail. Restoring the fix gives 27/27, and the full plugin suite 366/366.Not run
social.botawaken.comfrom this box.core/change, so nods-bot-patchesregeneration and no core suite run.Risk
Low. The only behaviour that changes is the value
previewInvitereturns forlead: an object now becomes the member label instead ofobject Object; every other field is untouched, and a string answer takes the same path as before. The card still cleans the string it receives, so the sanitizing path did not change.