fix: let voice/mute/kick/detach take --party
A host of two or more parties was told 'pass a name' by commands that accepted no name flag, making moderation impossible. Mirrors the --party flag invite already had.
This commit is contained in:
parent
9117f73423
commit
fc366f48fa
2 changed files with 71 additions and 22 deletions
|
|
@ -810,3 +810,30 @@ STUB
|
|||
! grep -q "server-access -aw $USER" "$TMUX_LOG" || \
|
||||
fail "should not have attempted -aw before capability check"
|
||||
}
|
||||
|
||||
@test "moderation accepts --party to disambiguate multiple hosted parties" {
|
||||
"$PARTY_BIN" host alpha
|
||||
"$PARTY_BIN" host bravo
|
||||
|
||||
# Without --party: ambiguous, must refuse and say so.
|
||||
run "$PARTY_BIN" kick nobody
|
||||
[ "$status" -ne 0 ]
|
||||
[[ "$output" == *"multiple parties"* ]]
|
||||
|
||||
# With --party: resolves, and the server-access -d lands on bravo's
|
||||
# socket specifically.
|
||||
: > "$TMUX_LOG"
|
||||
run "$PARTY_BIN" kick nobody --party bravo
|
||||
[ "$status" -eq 0 ]
|
||||
grep "server-access -d nobody" "$TMUX_LOG" | grep -q "party-$USER:bravo.d/sock"
|
||||
|
||||
: > "$TMUX_LOG"
|
||||
run "$PARTY_BIN" voice nobody --party alpha
|
||||
[ "$status" -eq 0 ]
|
||||
grep "server-access -w nobody" "$TMUX_LOG" | grep -q "party-$USER:alpha.d/sock"
|
||||
|
||||
run "$PARTY_BIN" mute nobody --party alpha
|
||||
[ "$status" -eq 0 ]
|
||||
run "$PARTY_BIN" detach nobody --party alpha
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue