@tmlmobilidade/interfaces 20251006.1604.57-staging.0 → 20251007.946.5-staging.0
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.
|
@@ -30,8 +30,8 @@ class NotificationsClass extends MongoCollectionClass {
|
|
|
30
30
|
is_read: false,
|
|
31
31
|
payload: {
|
|
32
32
|
body: description,
|
|
33
|
-
href: `${getAppConfig(`${
|
|
34
|
-
icon:
|
|
33
|
+
href: `${getAppConfig(`${scope}`, 'frontend_url')}/${scope}/${id}`,
|
|
34
|
+
icon: scope,
|
|
35
35
|
title: title,
|
|
36
36
|
},
|
|
37
37
|
priority: 'normal',
|
|
@@ -40,7 +40,7 @@ class NotificationsClass extends MongoCollectionClass {
|
|
|
40
40
|
updated_by: user?._id,
|
|
41
41
|
};
|
|
42
42
|
for (const user of usersWithTopic.filter(u => u._id !== notification.created_by)) {
|
|
43
|
-
const sendMail = user?.permissions.find(p => p.scope === 'notifications' && p.action ===
|
|
43
|
+
const sendMail = user?.permissions.find(p => p.scope === 'notifications' && p.action === topic)?.resource ?? false;
|
|
44
44
|
const newNotification = { ...notification, user_id: user._id };
|
|
45
45
|
if (sendMail) {
|
|
46
46
|
await sendNotificationEmail({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmlmobilidade/interfaces",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20251007.946.5-staging.0",
|
|
4
4
|
"author": "João de Vasconcelos & Jusi Monteiro",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"homepage": "https://github.com/tmlmobilidade/services#readme",
|