@amedia/user 0.13.21 → 0.13.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/clients/mercury.ts +1 -0
- package/src/lib/UserDataRequest.ts +7 -1
package/package.json
CHANGED
package/src/clients/mercury.ts
CHANGED
|
@@ -6,6 +6,7 @@ export class UserDeactivatedError extends Error {}
|
|
|
6
6
|
const EXPECTED_ERRORS = [
|
|
7
7
|
'no_session_found', // Not logged in
|
|
8
8
|
'subscription_not_found', // No active subscription
|
|
9
|
+
'publication_not_subscribable', // Activation is not possible on current publication
|
|
9
10
|
];
|
|
10
11
|
|
|
11
12
|
export const activateSubscription = async (
|
|
@@ -96,7 +96,7 @@ class UserDataRequest<
|
|
|
96
96
|
});
|
|
97
97
|
dispatch(
|
|
98
98
|
new CustomEvent(AmediaUserEvents.REQUEST_USER_ATTRIBUTES, {
|
|
99
|
-
detail: this.attributes,
|
|
99
|
+
detail: [...this.attributes, 'uuid'],
|
|
100
100
|
})
|
|
101
101
|
);
|
|
102
102
|
}
|
|
@@ -130,6 +130,12 @@ class UserDataRequest<
|
|
|
130
130
|
}
|
|
131
131
|
// @ts-ignore
|
|
132
132
|
if (data.state.isLoggedIn === false) {
|
|
133
|
+
if (
|
|
134
|
+
this.attributes?.includes('extraData') &&
|
|
135
|
+
!Object.keys(data.attributes).includes('extraData')
|
|
136
|
+
) {
|
|
137
|
+
return; // ExtraData is valid even for logged out users
|
|
138
|
+
}
|
|
133
139
|
resolve(data);
|
|
134
140
|
return;
|
|
135
141
|
}
|