From 10ace538458ed79ee1ffbeb331ff415f37f1c3d2 Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Wed, 27 Jan 2021 11:10:00 -0600 Subject: [PATCH] Remove unnecessary query param for /v1/certificate/delivery endpoint --- ts/textsecure/WebAPI.ts | 7 +------ ts/util/lint/exceptions.json | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index da7a8b0d8f..72497a578a 100644 --- a/ts/textsecure/WebAPI.ts +++ b/ts/textsecure/WebAPI.ts @@ -1086,17 +1086,12 @@ export function initialize({ } async function getSenderCertificate(omitE164?: boolean) { - const baseParameters = '?includeUuid=true'; - const urlParameters = `${baseParameters}${ - omitE164 ? '&includeE164=false' : '' - }`; - return _ajax({ call: 'deliveryCert', httpType: 'GET', responseType: 'json', validateResponse: { certificate: 'string' }, - urlParameters, + ...(omitE164 ? { urlParameters: '?includeE164=false' } : {}), }); } diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 0a9a22e3d3..1bc3405dae 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -15279,7 +15279,7 @@ "rule": "jQuery-wrap(", "path": "ts/textsecure/WebAPI.js", "line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(quote, 'binary', window.dcodeIO.ByteBuffer.LITTLE_ENDIAN);", - "lineNumber": 1278, + "lineNumber": 1270, "reasonCategory": "falseMatch", "updated": "2020-09-08T23:07:22.682Z" }, @@ -15287,7 +15287,7 @@ "rule": "jQuery-wrap(", "path": "ts/textsecure/WebAPI.ts", "line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(", - "lineNumber": 2179, + "lineNumber": 2174, "reasonCategory": "falseMatch", "updated": "2020-09-08T23:07:22.682Z" },