@live-change/notification-service 0.8.12 → 0.8.14
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/notification.js +23 -1
- package/package.json +6 -6
package/notification.js
CHANGED
|
@@ -190,7 +190,7 @@ definition.view({
|
|
|
190
190
|
const id = client.user
|
|
191
191
|
? `"user_User":"${client.user}"`
|
|
192
192
|
: `"session_Session":"${client.session}"`
|
|
193
|
-
console.log("UNREAD", 'unreadNotificationsCount', id)
|
|
193
|
+
//console.log("UNREAD", 'unreadNotificationsCount', id)
|
|
194
194
|
return ['database', 'indexObject', app.databaseName, 'notification_Notification_unreadNotificationsCount', id]
|
|
195
195
|
}
|
|
196
196
|
})
|
|
@@ -370,4 +370,26 @@ definition.action({
|
|
|
370
370
|
}
|
|
371
371
|
})
|
|
372
372
|
|
|
373
|
+
definition.action({
|
|
374
|
+
name: 'testNotification',
|
|
375
|
+
properties: {
|
|
376
|
+
notificationType: {
|
|
377
|
+
type: String
|
|
378
|
+
},
|
|
379
|
+
...config.fields
|
|
380
|
+
},
|
|
381
|
+
async execute({ notificationType, ...data }, { client, service }, emit) {
|
|
382
|
+
if(!notificationType) notificationType = 'example_TestNotification'
|
|
383
|
+
const fields = {}
|
|
384
|
+
for(const key in config.fields) fields[key] = data[key]
|
|
385
|
+
service.trigger({
|
|
386
|
+
type: 'notify',
|
|
387
|
+
sessionOrUserType: client.user ? 'user_User' : 'session_Session',
|
|
388
|
+
sessionOrUser: client.user || client.session,
|
|
389
|
+
notificationType,
|
|
390
|
+
...fields
|
|
391
|
+
})
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
|
|
373
395
|
export default definition
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/notification-service",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/live-change/live-change-
|
|
11
|
+
"url": "git+https://github.com/live-change/live-change-stack.git"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/live-change/live-change-
|
|
15
|
+
"url": "https://github.com/live-change/live-change-stack/issues"
|
|
16
16
|
},
|
|
17
|
-
"homepage": "https://github.com/live-change/live-change-
|
|
17
|
+
"homepage": "https://github.com/live-change/live-change-stack",
|
|
18
18
|
"author": {
|
|
19
19
|
"email": "michal@laszczewski.pl",
|
|
20
20
|
"name": "Michał Łaszczewski",
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "^0.8.
|
|
24
|
+
"@live-change/framework": "^0.8.14"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "d81b573fb8891746ae1c67f4f68558123c9f85f7",
|
|
27
27
|
"type": "module"
|
|
28
28
|
}
|