Skip to content

Commit d13caac

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/plugin/shelljs-and-standard--removed
2 parents 49f6bd1 + fffc84b commit d13caac

6 files changed

Lines changed: 66 additions & 16 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Auto respond and close issue
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
jobs:
9+
auto-respond-and-close-issue:
10+
uses: mparticle/mparticle-workflows/.github/workflows/auto-respond-close-issue.yml@main
11+
with:
12+
issue_number: ${{ github.event.issue.number }}
13+
repository: ${{ github.repository }}
14+
user_login: ${{ github.event.issue.user.login }}

.github/workflows/pull-request.yml

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1+
name: Build and Test
2+
on: [workflow_dispatch, pull_request]
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
permissions:
9+
contents: read
10+
pull-requests: read
11+
checks: write
12+
id-token: write
113

2-
name: "Build and Test"
3-
on: [push, pull_request]
414
jobs:
515
js-test:
6-
name: "JS Tests"
16+
name: JS Tests
717
runs-on: ubuntu-latest
818
defaults:
919
run:
@@ -12,7 +22,7 @@ jobs:
1222
matrix:
1323
node-version: [10.x, 12.x, 14.x, 15.x]
1424
steps:
15-
- name: "Checkout Branch"
25+
- name: Checkout Branch
1626
uses: actions/checkout@v2
1727
- name: Use Node.js ${{ matrix.node-version }}
1828
uses: actions/setup-node@v1
@@ -23,24 +33,36 @@ jobs:
2333
- name: "NPM Test"
2434
run: npm test
2535
android-test:
26-
name: "Android Unit Tests"
36+
name: Android Unit Tests
2737
runs-on: ubuntu-latest
2838
defaults:
2939
run:
3040
working-directory: ./plugin
3141
steps:
32-
- name: "Checkout Branch"
42+
- name: Checkout Branch
3343
uses: actions/checkout@v2
3444
- name: "Install JDK 11"
3545
uses: actions/setup-java@v2
3646
with:
37-
distribution: "zulu"
38-
java-version: "11"
39-
- name: "Install NPM"
47+
distribution: zulu
48+
java-version: 11
49+
- name: Install NPM
4050
uses: actions/setup-node@v1
41-
- name: "NPM Build"
51+
- name: NPM Build
4252
run: |
4353
npm ci
4454
npm run build --if-present
45-
- name: "Run Unit Tests"
46-
run: ./gradlew test
55+
- name: Run Unit Tests
56+
run: ./gradlew test
57+
58+
pr-notify:
59+
if: >
60+
github.event_name == 'pull_request' &&
61+
github.event.pull_request.draft == false
62+
needs:
63+
- js-test
64+
- android-test
65+
name: Notify GChat
66+
uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
67+
secrets:
68+
gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [2.2.4](https://github.com/mParticle/cordova-plugin-mparticle/compare/2.2.3...2.2.4) (2023-03-14)
2+
3+
4+
### Bug Fixes
5+
6+
* Setting DDPR Consents on iOS ([#23](https://github.com/mParticle/cordova-plugin-mparticle/issues/23)) ([c13eaa7](https://github.com/mParticle/cordova-plugin-mparticle/commit/c13eaa7f3e68fb3a510de75c25831c44ce716dc9))
7+
8+
## [2.2.3](https://github.com/mParticle/cordova-plugin-mparticle/compare/2.2.2...2.2.3) (2023-01-09)
9+
10+
11+
### Bug Fixes
12+
13+
* Android Consent now retains previously Set Consent States ([#22](https://github.com/mParticle/cordova-plugin-mparticle/issues/22)) ([c5ce970](https://github.com/mParticle/cordova-plugin-mparticle/commit/c5ce97014b9cefc86c878f899472848c1d3fa6f7))
14+
115
## [2.2.2](https://github.com/mParticle/cordova-plugin-mparticle/compare/2.2.1...2.2.2) (2022-09-29)
216

317

plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-mparticle",
3-
"version": "2.2.2",
3+
"version": "2.2.4",
44
"description": "Cordova plugin for mParticle",
55
"homepage": "https://www.mparticle.com",
66
"repository": "mParticle/cordova-plugin-mparticle",

plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public void addGDPRConsentState(final JSONArray args) throws JSONException, Pars
359359
String purpose = args.getString(1);
360360
if (user != null && map != null && purpose != null) {
361361
GDPRConsent newConsent = ConvertGDPRConsent(map);
362-
ConsentState state = ConsentState.builder()
362+
ConsentState state = ConsentState.withConsentState(user.getConsentState())
363363
.addGDPRConsentState(purpose, newConsent)
364364
.build();
365365

@@ -384,7 +384,7 @@ public void addCCPAConsentState(final JSONArray args) throws JSONException, Pars
384384
final JSONObject map = args.getJSONObject(0);
385385
if (user != null && map != null) {
386386
CCPAConsent newConsent = ConvertCCPAConsent(map);
387-
ConsentState state = ConsentState.builder()
387+
ConsentState state = ConsentState.withConsentState(user.getConsentState())
388388
.setCCPAConsentState(newConsent)
389389
.build();
390390

plugin/src/ios/CDVMParticle.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ - (void)setATTStatus:(CDVInvokedUrlCommand*)command {
7272
- (void)addGDPRConsentState:(CDVInvokedUrlCommand*)command {
7373
[self.commandDelegate runInBackground:^{
7474
NSMutableDictionary *serializedConsent = [command.arguments objectAtIndex:0];
75-
NSString *purpose = [command.arguments objectAtIndex:0];
75+
NSString *purpose = [command.arguments objectAtIndex:1];
7676

7777
MPGDPRConsent *consent = [CDVMParticle MPGDPRConsent:serializedConsent];
7878
MPConsentState *consentState = [[MParticle sharedInstance].identity.currentUser.consentState copy];

0 commit comments

Comments
 (0)