feat(pairing): show sender ids across providers

This commit is contained in:
Peter Steinberger
2026-01-08 23:19:13 +00:00
parent 7c7858a519
commit e0439df4ce
13 changed files with 156 additions and 2 deletions

View File

@@ -146,6 +146,9 @@ describe("monitorSignalProvider tool results", () => {
expect(replyMock).not.toHaveBeenCalled();
expect(upsertPairingRequestMock).toHaveBeenCalled();
expect(sendMock).toHaveBeenCalledTimes(1);
expect(String(sendMock.mock.calls[0]?.[1] ?? "")).toContain(
"Your Signal number: +15550001111",
);
expect(String(sendMock.mock.calls[0]?.[1] ?? "")).toContain(
"Pairing code: PAIRCODE",
);
@@ -237,6 +240,9 @@ describe("monitorSignalProvider tool results", () => {
);
expect(sendMock).toHaveBeenCalledTimes(1);
expect(sendMock.mock.calls[0]?.[0]).toBe(`signal:${uuid}`);
expect(String(sendMock.mock.calls[0]?.[1] ?? "")).toContain(
`Your Signal sender id: uuid:${uuid}`,
);
});
it("reconnects after stream errors until aborted", async () => {

View File

@@ -317,6 +317,10 @@ export async function monitorSignalProvider(
const senderRecipient = resolveSignalRecipient(sender);
const senderPeerId = resolveSignalPeerId(sender);
const senderAllowId = formatSignalSenderId(sender);
const senderIdLine =
sender.kind === "phone"
? `Your Signal number: ${sender.e164}`
: `Your Signal sender id: ${senderAllowId}`;
if (!senderRecipient) return;
const groupId = dataMessage.groupInfo?.groupId ?? undefined;
const groupName = dataMessage.groupInfo?.groupName ?? undefined;
@@ -351,6 +355,8 @@ export async function monitorSignalProvider(
[
"Clawdbot: access not configured.",
"",
senderIdLine,
"",
`Pairing code: ${code}`,
"",
"Ask the bot owner to approve with:",