This commit is contained in:
@@ -32,6 +32,7 @@ export function registerSearchCommands(program: Command, ctx: CliContext): void
|
||||
const count = Number.parseInt(cmdOpts.count || '10', 10);
|
||||
const maxPages = cmdOpts.maxPages ? Number.parseInt(cmdOpts.maxPages, 10) : undefined;
|
||||
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
|
||||
const profileName = ctx.resolveProfileNameFromOptions(opts);
|
||||
|
||||
const usePagination = cmdOpts.all || cmdOpts.cursor;
|
||||
if (maxPages !== undefined && !usePagination) {
|
||||
@@ -47,7 +48,7 @@ export function registerSearchCommands(program: Command, ctx: CliContext): void
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const client = new TwitterClient({ relayBaseUrl, timeoutMs, quoteDepth });
|
||||
const client = new TwitterClient({ relayBaseUrl, profileName, timeoutMs, quoteDepth });
|
||||
const includeRaw = cmdOpts.jsonFull ?? false;
|
||||
const searchOptions = { includeRaw };
|
||||
const paginationOptions = { includeRaw, maxPages, cursor: cmdOpts.cursor };
|
||||
@@ -90,8 +91,9 @@ export function registerSearchCommands(program: Command, ctx: CliContext): void
|
||||
|
||||
let query: string | null = fromUserOpt.query;
|
||||
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
|
||||
const profileName = ctx.resolveProfileNameFromOptions(opts);
|
||||
|
||||
const client = new TwitterClient({ relayBaseUrl, timeoutMs, quoteDepth });
|
||||
const client = new TwitterClient({ relayBaseUrl, profileName, timeoutMs, quoteDepth });
|
||||
|
||||
if (!query) {
|
||||
const who = await client.getCurrentUser();
|
||||
|
||||
Reference in New Issue
Block a user