cli: Fix create_invite's expire option.

This commit is contained in:
2025-01-30 22:16:06 -05:00
parent d4a5cc6eee
commit 916aa5abbd
2 changed files with 14 additions and 7 deletions

View File

@ -808,8 +808,8 @@ static int _tf_command_create_invite(const char* file, int argc, char* argv[])
const char* default_db_path = _get_db_path();
const char* db_path = default_db_path;
const char* identity = NULL;
int use_count = 0;
int expires = 0;
int use_count = 1;
int expires = 3600;
bool show_usage = false;
const char* host = NULL;
int port = 0;
@ -868,8 +868,8 @@ static int _tf_command_create_invite(const char* file, int argc, char* argv[])
tf_printf(" -i, --identity identity Account from which to get latest sequence number.\n");
tf_printf(" -a, --address address Address to which the recipient will connect.\n");
tf_printf(" -p, --port port Port to which the recipient will connect.\n");
tf_printf(" -u, --use_count count Number of times this invite may be used.\n");
tf_printf(" -e, --expires seconds How long this invite is valid in seconds (-1 for indefinitely).\n");
tf_printf(" -u, --use_count count Number of times this invite may be used (default: 1).\n");
tf_printf(" -e, --expires seconds How long this invite is valid in seconds (-1 for indefinitely, default: 1 hour).\n");
tf_printf(" -h, --help Show this usage information.\n");
tf_free((void*)default_db_path);
return EXIT_FAILURE;