diff options
Diffstat (limited to 'bin/pi-forum')
| -rwxr-xr-x | bin/pi-forum | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/pi-forum b/bin/pi-forum index 37ea051..d3c567c 100755 --- a/bin/pi-forum +++ b/bin/pi-forum @@ -145,8 +145,9 @@ function format(post, no, forum, opts) { return `${head.join(" ")}\n${post.text.replace(/\s+$/, "")}\n`; } -function memberLine(a) { - if (!a.stopped) return ` ${who(a)}${dim(` ${a.cwd}`)}`; +function memberLine(a, forumId) { + const muted = a.muted && (a.muted.all || (a.muted.forums || []).includes(forumId)) ? yellow(" muted") : ""; + if (!a.stopped) return ` ${who(a)}${muted}${dim(` ${a.cwd}`)}`; return dim(` ${who(a)} stopped${a.stoppedAt ? ` since ${when(a.stoppedAt)}` : ""}`); } @@ -163,7 +164,7 @@ function list() { const last = posts.length ? `, last ${when(posts[posts.length - 1].at)}` : ""; console.log(`${bold(f.name)} ${dim(`[${f.id}] ${posts.length} post(s)${last}`)}`); members.sort((a, b) => a.stopped - b.stopped); - console.log(members.length ? members.map(memberLine).join("\n") : dim(" no members")); + console.log(members.length ? members.map((a) => memberLine(a, f.id)).join("\n") : dim(" no members")); if (f.pin) console.log(` ${yellow("pin")}: ${f.pin.text} ${dim(`(${who(f.pin.by)}, ${when(f.pin.at)})`)}`); console.log(); } |
