Skip to content

Commit

Permalink
Remove duplicate segment handling (prebid#7622)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-sayson authored and Chris Pabst committed Jan 10, 2022
1 parent 0956fe7 commit 41abb4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function buildFpdQueryParams(fpdPath) {
return acc;
}, {})
return Object.keys(fpd)
.map((name, _) => name + ':' + [...new Set(fpd[name])].join('|'))
.map((name, _) => name + ':' + fpd[name].join('|'))
.join(',')
}

Expand Down
26 changes: 0 additions & 26 deletions test/spec/modules/openxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,32 +1602,6 @@ describe('OpenxAdapter', function () {
scsm: 'dmp3/5:foo2|bar2,dmp4:baz2'
},
},
{
name: 'should not send duplicate proprietary segment data from first party config ',
config: {
ortb2: {
user: {
data: [
{name: 'dmp1', ext: {segtax: 4}, segment: [{id: 'foo'}, {id: 'bar'}, {id: 'foo'}]},
{name: 'dmp1', ext: {segtax: 4}, segment: [{id: 'foo'}, {id: 'bar'}]},
]
},
site: {
content: {
data: [
{name: 'dmp1', ext: {segtax: 4}, segment: [{id: 'foo'}, {id: 'bar'}]},
{name: 'dmp3', ext: {segtax: 5}, segment: [{id: 'foo2'}, {id: 'foo2'}, {id: 'bar2'}]},
{name: 'dmp3', ext: {segtax: 5}, segment: [{id: 'foo2'}, {id: 'bar2'}]},
]
}
}
}
},
expect: {
sm: 'dmp1/4:foo|bar',
scsm: 'dmp1/4:foo|bar,dmp3/5:foo2|bar2'
},
},
{
name: 'should combine same provider segment data from ortb2.user.data',
config: {
Expand Down

0 comments on commit 41abb4c

Please sign in to comment.