#!/usr/bin/env bash # Background watcher for Cordn private-chat join requests. Runs from the local # repo so it can reach the coordinator and send NIP-17/NIP-78 notifications. set -euo pipefail cd "$(dirname "$0")/.." if [ -d "$HOME/.nvm/versions/node" ]; then NODE_BIN="$(ls -d "$HOME"/.nvm/versions/node/*/bin 2>/dev/null | sort -V | tail -1)" [ -n "$NODE_BIN" ] && export PATH="$NODE_BIN:$PATH" fi exec npx tsx scripts/cordn-join-watcher.ts