diff --git a/party b/party index 10fd8ae..17f676d 100755 --- a/party +++ b/party @@ -548,7 +548,8 @@ tmux="$PARTY_TMUX" EOF cat >> "$notify_script" <<'EOF' # Auto-generated by party. Fan a display-message out to every client -# of the party server. Args: $1 = socket, $2 = client_user, $3 = "joined"|"left" +# of the party server. Args: $1 = socket, $2 = user, $3 = verb (e.g. +# "joined", "left", "started logging", "stopped logging") sock="$1"; user="$2"; verb="$3" "$tmux" -S "$sock" list-clients -F '#{client_name}' 2>/dev/null \ | while read -r c; do @@ -1069,15 +1070,12 @@ EOF # Tell everyone in the room when recording starts or stops: a # transcript nobody knew about is the kind of surprise the social -# design exists to avoid. Same fan-out shape as the .party-notify -# helper, run inline because only the host (who is authorized by -# definition) calls it. +# design exists to avoid. Reuses the .party-notify script generated at +# host time, so the broadcast reads "$USER started logging the party" +# / "$USER stopped logging the party". Tolerant of failure: a missing +# or unreadable notify script shouldn't abort logging. log_notify() { - "$PARTY_TMUX" -S "$RR_SOCKET" list-clients -F '#{client_name}' 2>/dev/null \ - | while read -r _ln_c; do - "$PARTY_TMUX" -S "$RR_SOCKET" display-message -c "$_ln_c" \ - "$USER $1 logging this party" 2>/dev/null || : - done + "${RR_SOCKET%/sock}/.party-notify" "$RR_SOCKET" "$USER" "$1 logging" || : } cmd_log() {