@geexcode/geex-angular 0.0.31 → 0.0.32
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.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -238,10 +238,12 @@ function createMessagingModule(injector) {
|
|
|
238
238
|
const module2 = {
|
|
239
239
|
async init() {
|
|
240
240
|
try {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
if (injector.get(import_angular_oauth2_oidc.OAuthService).hasValidAccessToken()) {
|
|
242
|
+
const subClient = injector.get(import_apollo_angular.Apollo).use("subscription");
|
|
243
|
+
subClient.subscribe({ query: GQL_ON_PUBLIC_NOTIFY }).pipe((0, import_rxjs.map)((res) => res?.data?.onPublicNotify)).subscribe((notify) => {
|
|
244
|
+
module2.onPublicNotify(notify);
|
|
245
|
+
});
|
|
246
|
+
}
|
|
245
247
|
} catch (err) {
|
|
246
248
|
console.error(err);
|
|
247
249
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -192,10 +192,12 @@ function createMessagingModule(injector) {
|
|
|
192
192
|
const module = {
|
|
193
193
|
async init() {
|
|
194
194
|
try {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
if (injector.get(OAuthService).hasValidAccessToken()) {
|
|
196
|
+
const subClient = injector.get(Apollo).use("subscription");
|
|
197
|
+
subClient.subscribe({ query: GQL_ON_PUBLIC_NOTIFY }).pipe(map((res) => res?.data?.onPublicNotify)).subscribe((notify) => {
|
|
198
|
+
module.onPublicNotify(notify);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
199
201
|
} catch (err) {
|
|
200
202
|
console.error(err);
|
|
201
203
|
}
|