refactor(mobile): remove unused awareness relay URL normalizer (#10029)
This commit is contained in:
1 parent
31fb210090
commit
37bf4e6ec4
2 files changed
-18
No files matched your search
@@ -33,7 +33,6 @@ import {
|
||||
mergeAgentAwarenessRegistrationPreferences,
|
||||
refreshActiveLiveActivityRemoteRegistration,
|
||||
refreshAgentAwarenessRegistration,
|
||||
normalizeAgentAwarenessRelayBaseUrl,
|
||||
registerAgentAwarenessConnection,
|
||||
registerLiveActivityPushToken,
|
||||
releaseAgentAwarenessRelayTokenProvider,
|
||||
@@ -363,13 +362,6 @@ describe("makeRelayDeviceRegistrationRequest", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("normalizes relay base URLs for APNs registration requests", () => {
|
||||
expect(normalizeAgentAwarenessRelayBaseUrl(" https://relay.example.test/// ")).toBe(
|
||||
"https://relay.example.test",
|
||||
);
|
||||
expect(normalizeAgentAwarenessRelayBaseUrl(" ")).toBeNull();
|
||||
});
|
||||
|
||||
it("overrides persisted preferences for an in-flight registration", () => {
|
||||
expect(
|
||||
mergeAgentAwarenessRegistrationPreferences(
|
||||
|
||||
@@ -139,16 +139,6 @@ export function mergeAgentAwarenessRegistrationPreferences(
|
||||
return { ...stored, ...override };
|
||||
}
|
||||
|
||||
export function normalizeAgentAwarenessRelayBaseUrl(
|
||||
value: string | null | undefined,
|
||||
): string | null {
|
||||
const trimmed = value?.trim();
|
||||
if (!trimmed) {
|
||||
return null;
|
||||
}
|
||||
return trimmed.replace(/\/+$/g, "");
|
||||
}
|
||||
|
||||
function readRelayConfig(): { readonly url: string } | null {
|
||||
const relayUrl = resolveCloudPublicConfig().relay.url;
|
||||
if (!relayUrl) {
|
||||
|
||||
Reference in new issue
Block a user