From ec5f6a0581494e56897d845d18774447a1fad276 Mon Sep 17 00:00:00 2001 From: Abhiram Date: Wed, 27 May 2026 15:13:11 -0500 Subject: [PATCH] feat: print shareable link after contacts add After a successful `linq contacts add`, also print (and include in --json output as `shareLink`) a URL of the form https://linqapp.com/s/text/+1YYY?from=+1XXX&msg=hi%20from%20linq. When the recipient opens the link on a phone it redirects straight into Messages with a pre-filled draft to the Linq Number; on desktop the page shows a QR code that scans to the same draft. This removes the "how do I get them to text first" friction in the inbound-first handshake. Also reworded the existing "Text X from Y to start the conversation" line to "Text your Linq Number (X) from Y to start the conversation." so the two outputs read consistently. --- src/commands/contacts/add.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/commands/contacts/add.ts b/src/commands/contacts/add.ts index 419b6b9..b74e7b0 100644 --- a/src/commands/contacts/add.ts +++ b/src/commands/contacts/add.ts @@ -48,11 +48,15 @@ export default class ContactsAdd extends BaseCommand { addBreadcrumb('Contact added'); const linqNumber = config.fromPhone; + const shareLink = linqNumber + ? `https://linqapp.com/s/text/${encodeURIComponent(linqNumber)}?from=${encodeURIComponent(data.contactPhone)}&msg=${encodeURIComponent('hi from linq')}` + : null; if (flags.json) { this.log(JSON.stringify({ contactPhone: data.contactPhone, linqNumber: linqNumber ?? null, + shareLink, }, null, 2)); return; } @@ -60,7 +64,11 @@ export default class ContactsAdd extends BaseCommand { this.log(chalk.green(`\n ✓ Contact ${data.contactPhone} added.\n`)); this.log(chalk.yellow(' Inbound-first: this contact must text your Linq Number before you can text them.\n')); if (linqNumber) { - this.log(` Text ${chalk.cyan(linqNumber)} from ${chalk.cyan(data.contactPhone)} to start the conversation.\n`); + this.log(` Text your Linq Number (${chalk.cyan(linqNumber)}) from ${chalk.cyan(data.contactPhone)} to start the conversation.\n`); + } + if (shareLink) { + this.log(` Or share this link — they tap it and send a text to talk to your Shared line (QR fallback on desktop):`); + this.log(` ${chalk.cyan(shareLink)}\n`); } } catch (e) { bail(this, flags.json, e);