Skip to content

Commit 818b857

Browse files
committed
refactor(routing): remove redundant resolveLinkedPeerId wrapper
resolveLinkedPeerId() was a pure pass-through to resolveCanonicalIdentityFromLinks() with the same params and a single call site. Call resolveCanonicalIdentityFromLinks() directly.
1 parent cc34abe commit 818b857

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/routing/session-key.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export function buildAgentPeerSessionKey(params: {
227227
const linkedPeerId =
228228
dmScope === "main"
229229
? null
230-
: resolveLinkedPeerId({
230+
: resolveCanonicalIdentityFromLinks({
231231
identityLinks: params.identityLinks,
232232
channel: params.channel,
233233
peerId,
@@ -309,14 +309,6 @@ export function resolveCanonicalIdentityFromLinks(params: {
309309
return null;
310310
}
311311

312-
function resolveLinkedPeerId(params: {
313-
identityLinks?: Record<string, string[]>;
314-
channel: string;
315-
peerId: string;
316-
}): string | null {
317-
return resolveCanonicalIdentityFromLinks(params);
318-
}
319-
320312
export function buildGroupHistoryKey(params: {
321313
channel: string;
322314
accountId?: string | null;

0 commit comments

Comments
 (0)