mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:01:23 +00:00
feat(pairing): show sender ids across providers
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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:",
|
||||
|
||||
Reference in New Issue
Block a user