You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2d98472
Browse filesBrowse the repository at this point in the historyBrowse files
test(social): pin that a co-seat never clears face_room_auto_send_off on a room-share line
A Bot that sits in a room as someone else's seat is not the owner pressing that
Bot's own in-room Auto-send switch. Bot Social holds such a line with
`face_room_auto_send_off`, and only the face-room path clears that name:
`autoSendFaceLine` (`plugins/social/src/social.js:4574`) reads it through
`holdAllowsFaceAutoSend`, and only while that Bot's in-room switch is on. A room
envelope is a different consent - the click that added the Bot - so
`autoSendRoomEnvelope` (`:2043`) clears the blanket hold and an ordinary room
`policy` hold, never the switch; the comment above `FACE_ROOM_AUTO_SEND_OFF`
(`:171-189`) says the same in one place.
The case pins both halves of that today, not a fix:
- a `send_as_member` line under `via: 'room-share'` held for
`face_room_auto_send_off` comes back pending (`'kept'`), on its card, with
the reason on it, and sharing the room approves nothing;
- the reverse, in the same case: the same Bot's in-room line is held while that
switch is off and leaves once the owner turns it on.
The source is untouched: `plugins/social/src/social.js` here hashes the same as
the `77a6b4d4` blob (`a54efebdce49257e526ffb40b8596ae3c69c03f0fd77f72ded9f0098fe086aa1`).
The code is already right, so the case is checked with a mutation instead of a
red-first run: adding `|| holdAllowsFaceAutoSend(held)` to the clearing
condition at `:2043` turns the new case red (1 test / 0 pass / 1 fail), and
reverting that line restores the file byte for byte.
At this tip the social file runs 450 tests without the case and 451 with it;
the case alone is 1/1; plugin lint reports social 36 warnings / 0 errors.
Fixes#2209
Docs-not-needed: test-only; the clearing rule and the documented behaviour are unchanged.
Copy file name to clipboardExpand all lines: plugins/social/test/social.test.js
+97Lines changed: 97 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2199,6 +2199,103 @@ test('#457: a Bot whose face-room Auto-send is on has its clean held line approv
2199
2199
assert.equal(approvals().length, 2)
2200
2200
})
2201
2201
2202
+
// #1175: a co-seat is not an authorization. Bot Social holds a face-room line it would otherwise send
2203
+
// with `face_room_auto_send_off`, and only the face-room path clears that name: `autoSendFaceLine`
2204
+
// (`social.js:4574`) reads it through `holdAllowsFaceAutoSend`, and only while that Bot's own in-room
2205
+
// Auto-send switch is on. A room envelope is a different consent — the click that added the Bot — and
2206
+
// `autoSendRoomEnvelope` (`social.js:2043`) clears the blanket hold (#847) and an ordinary room `policy`
2207
+
// hold (#1113, #1118), never the switch; the comment above `FACE_ROOM_AUTO_SEND_OFF`
2208
+
// (`social.js:171-189`) says the same in one place. Two Bot homes sharing a row is not the owner
2209
+
// pressing that switch, so the room-share line has to come back `'kept'`, on its card.
2210
+
// `face_room_auto_send_off` = that Bot's own in-room Auto-send switch is off; `blanket` / `policy`
2211
+
// remainders mean the clearing path failed — that is the real bug.
2212
+
test('#1175: a co-seat is not the Auto-send switch: a room-share row held for `face_room_auto_send_off` stays on its card, and the same Bot in a face room clears it', async (t) => {
2213
+
// The room this home seated a stranger's Bot in (#883): a room share goes under the room's id.
0 commit comments