feat: support relay profile selection
CI / test (push) Successful in 10m2s

This commit is contained in:
2026-06-24 18:30:24 +09:00
parent 7a036e244d
commit 3f370cc4b6
24 changed files with 160 additions and 25 deletions
+4 -2
View File
@@ -41,7 +41,8 @@ export function registerPostCommands(program: Command, ctx: CliContext): void {
process.exit(1);
}
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
const client = new TwitterClient({ relayBaseUrl, timeoutMs, quoteDepth });
const profileName = ctx.resolveProfileNameFromOptions(opts);
const client = new TwitterClient({ relayBaseUrl, profileName, timeoutMs, quoteDepth });
const mediaIds = await uploadMediaOrExit(client, media, ctx);
const result = await client.tweet(text, mediaIds);
@@ -72,9 +73,10 @@ export function registerPostCommands(program: Command, ctx: CliContext): void {
}
const tweetId = ctx.extractTweetId(tweetIdOrUrl);
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
const profileName = ctx.resolveProfileNameFromOptions(opts);
console.error(`${ctx.p('info')}Replying to tweet: ${tweetId}`);
const client = new TwitterClient({ relayBaseUrl, timeoutMs, quoteDepth });
const client = new TwitterClient({ relayBaseUrl, profileName, timeoutMs, quoteDepth });
const mediaIds = await uploadMediaOrExit(client, media, ctx);
const result = await client.reply(text, tweetId, mediaIds);