From 406692b7d17675a9112e79dfa51de16105d88546 Mon Sep 17 00:00:00 2001 From: matthieularere-msq <63732822+matthieularere-msq@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:00:26 +0200 Subject: [PATCH 1/5] Update mediasquareBidAdapter.js --- modules/mediasquareBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/mediasquareBidAdapter.js b/modules/mediasquareBidAdapter.js index a586157bf20..a600693a6cb 100644 --- a/modules/mediasquareBidAdapter.js +++ b/modules/mediasquareBidAdapter.js @@ -156,6 +156,7 @@ export const spec = { if (bid.hasOwnProperty('mediasquare')) { if (bid['mediasquare'].hasOwnProperty('bidder')) { params.push('bidder=' + bid['mediasquare']['bidder']); } if (bid['mediasquare'].hasOwnProperty('code')) { params.push('code=' + bid['mediasquare']['code']); } + if (bid['mediasquare'].hasOwnProperty('match')) { params.push('match=' + bid['mediasquare']['match']); } }; for (let i = 0; i < paramsToSearchFor.length; i++) { if (bid.hasOwnProperty(paramsToSearchFor[i])) { params.push(paramsToSearchFor[i] + '=' + bid[paramsToSearchFor[i]]); } From 8b97086478f442c50d473ebf07716b82e1fe8eff Mon Sep 17 00:00:00 2001 From: matthieularere-msq <63732822+matthieularere-msq@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:03:19 +0200 Subject: [PATCH 2/5] Update mediasquareBidAdapter.js --- modules/mediasquareBidAdapter.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mediasquareBidAdapter.js b/modules/mediasquareBidAdapter.js index a600693a6cb..0c07c588336 100644 --- a/modules/mediasquareBidAdapter.js +++ b/modules/mediasquareBidAdapter.js @@ -106,6 +106,9 @@ export const spec = { 'advertiserDomains': value['adomain'] } }; + if ('match' in value) { + bidResponse['mediasquare']['match'] = value['match']; + } if ('native' in value) { bidResponse['native'] = value['native']; bidResponse['mediaType'] = 'native'; From 6a4d8e93b8fda03a7ffd84c193cde25e2686b355 Mon Sep 17 00:00:00 2001 From: matthieularere-msq <63732822+matthieularere-msq@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:10:20 +0200 Subject: [PATCH 3/5] Update mediasquareBidAdapter_spec.js --- test/spec/modules/mediasquareBidAdapter_spec.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/spec/modules/mediasquareBidAdapter_spec.js b/test/spec/modules/mediasquareBidAdapter_spec.js index 20e5588a99e..fadfa26ece2 100644 --- a/test/spec/modules/mediasquareBidAdapter_spec.js +++ b/test/spec/modules/mediasquareBidAdapter_spec.js @@ -140,7 +140,13 @@ describe('MediaSquare bid adapter tests', function () { expect(bid.meta.advertiserDomains).to.exist; expect(bid.meta.advertiserDomains).to.have.lengthOf(1); }); - + it('Verifies match', function () { + const request = spec.buildRequests(DEFAULT_PARAMS, DEFAULT_OPTIONS); + BID_RESPONSE.body.responses[0].match = true; + const response = spec.interpretResponse(BID_RESPONSE, request); + expect(bid.mediasquare.match).to.exist; + expect(bid.mediasquare.match).to.equal(true); + }); it('Verifies bidder code', function () { expect(spec.code).to.equal('mediasquare'); }); From 0021531d70b43d9aa140263e06e33eec3a2e3ecd Mon Sep 17 00:00:00 2001 From: matthieularere-msq <63732822+matthieularere-msq@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:20:04 +0200 Subject: [PATCH 4/5] Update mediasquareBidAdapter_spec.js --- test/spec/modules/mediasquareBidAdapter_spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/spec/modules/mediasquareBidAdapter_spec.js b/test/spec/modules/mediasquareBidAdapter_spec.js index fadfa26ece2..f3f09a8ddf8 100644 --- a/test/spec/modules/mediasquareBidAdapter_spec.js +++ b/test/spec/modules/mediasquareBidAdapter_spec.js @@ -144,6 +144,7 @@ describe('MediaSquare bid adapter tests', function () { const request = spec.buildRequests(DEFAULT_PARAMS, DEFAULT_OPTIONS); BID_RESPONSE.body.responses[0].match = true; const response = spec.interpretResponse(BID_RESPONSE, request); + const bid = response[0]; expect(bid.mediasquare.match).to.exist; expect(bid.mediasquare.match).to.equal(true); }); From 0306c753a98c737351f655135695a4e5bb8aa3b1 Mon Sep 17 00:00:00 2001 From: matthieularere-msq <63732822+matthieularere-msq@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:26:41 +0200 Subject: [PATCH 5/5] Update mediasquareBidAdapter.js --- modules/mediasquareBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mediasquareBidAdapter.js b/modules/mediasquareBidAdapter.js index 0c07c588336..e442b01a115 100644 --- a/modules/mediasquareBidAdapter.js +++ b/modules/mediasquareBidAdapter.js @@ -165,7 +165,7 @@ export const spec = { if (bid.hasOwnProperty(paramsToSearchFor[i])) { params.push(paramsToSearchFor[i] + '=' + bid[paramsToSearchFor[i]]); } } if (params.length > 0) { params = '?' + params.join('&'); } - ajax(endpoint + BIDDER_ENDPOINT_WINNING + params, null); + ajax(endpoint + BIDDER_ENDPOINT_WINNING + params, null, undefined, {method: 'GET', withCredentials: true}); return true; }