summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-cli/src/meshbay_cli/commands/chat.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-cli/src/meshbay_cli/commands/chat.py')
-rw-r--r--packages/meshbay-cli/src/meshbay_cli/commands/chat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/meshbay-cli/src/meshbay_cli/commands/chat.py b/packages/meshbay-cli/src/meshbay_cli/commands/chat.py
index e410a6a..557592e 100644
--- a/packages/meshbay-cli/src/meshbay_cli/commands/chat.py
+++ b/packages/meshbay-cli/src/meshbay_cli/commands/chat.py
@@ -28,7 +28,7 @@ from ..client.groups import my_groups, open_group
from ..client.paths import group_arg, handle, resolve_group
from ..client.roster import RosterCheck
from ..errors import NODE, USAGE, CliError
-from ..output import date, err, human_size, safe, sentence
+from ..output import date, err, human_size, safe, sentence, terminal
from .context import Context
HELP = ("chat: alone, interactively; with a group, its last 10 messages (-N for N), "
@@ -90,7 +90,7 @@ async def run(ctx: Context) -> int:
if a.group is None:
if a.message is not None or a.follow:
raise CliError(USAGE, "Name the group to post to.")
- if not (sys.stdin.isatty() and sys.stdout.isatty()):
+ if not (terminal(sys.stdin) and terminal(sys.stdout)):
raise CliError(USAGE, "The interactive chat needs a terminal; name a group "
"to read it, or to post with -m.")
from ..tui.app import run_interactive