-
Notifications
You must be signed in to change notification settings - Fork 155
Support destination filters for device mode action destinations #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
f9ab178
1fa9181
c6941c6
928bcf4
610b8d9
7cf9f61
3a0a0d6
ec805f0
1c09bcb
9f85e2d
55b2204
75696fb
fb5f145
50f98e3
24d6a34
9fc4388
2897b0e
d324c8e
18aa37e
308dd54
91f0d8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@segment/analytics-next': minor | ||
| --- | ||
|
|
||
| Added destination filter support to action destinations |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,9 +232,14 @@ export class EventQueue extends Emitter { | |
| return true | ||
| } | ||
|
|
||
| const alternativeNameMatch = p.alternativeNames?.filter((name) => | ||
| Object.keys(denyList).includes(name) | ||
| ) | ||
|
|
||
| // Explicit integration option takes precedence, `All: false` does not apply to Segment.io | ||
| return ( | ||
| denyList[p.name] ?? | ||
| alternativeNameMatch ?? | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch - fixed the logic and added a new test |
||
| (p.name === 'Segment.io' ? true : denyList.All) !== false | ||
| ) | ||
| }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import { SegmentEvent } from '../core/events' | ||
|
|
||
| export const klona = (evt: SegmentEvent): SegmentEvent => | ||
| JSON.parse(JSON.stringify(evt)) |
Uh oh!
There was an error while loading. Please reload this page.