Merge branch 'activitypub' of https://github.com/NodeBB/NodeBB into activitypub

This commit is contained in:
Barış Soner Uşaklı
2024-09-23 09:14:24 -04:00
4 changed files with 13 additions and 7 deletions

View File

@@ -105,8 +105,8 @@
"nodebb-plugin-emoji-android": "4.0.0",
"nodebb-plugin-markdown": "13.0.0-pre.9",
"nodebb-plugin-mentions": "4.6.8",
"nodebb-plugin-ntfy": "1.7.7",
"nodebb-plugin-spam-be-gone": "2.2.2",
"nodebb-plugin-web-push": "0.6.0",
"nodebb-rewards-essentials": "1.0.0",
"nodebb-theme-harmony": "2.0.0-pre.36",
"nodebb-theme-lavender": "7.1.8",
@@ -129,7 +129,7 @@
"rss": "1.2.2",
"rtlcss": "4.3.0",
"sanitize-html": "2.13.0",
"sass": "1.79.1",
"sass": "1.79.2",
"semver": "7.6.3",
"serve-favicon": "2.5.0",
"sharp": "0.32.6",
@@ -172,11 +172,11 @@
"mocha": "10.7.3",
"mocha-lcov-reporter": "1.3.0",
"mockdate": "3.0.5",
"nyc": "17.0.0",
"nyc": "17.1.0",
"smtp-server": "3.13.5"
},
"optionalDependencies": {
"sass-embedded": "1.79.1"
"sass-embedded": "1.79.2"
},
"resolutions": {
"*/jquery": "3.7.1"
@@ -199,4 +199,4 @@
"url": "https://github.com/barisusakli"
}
]
}
}

View File

@@ -43,8 +43,13 @@ self.addEventListener('push', function (event) {
const { title, body, tag, data } = event.data.json();
if (title && body) {
const icon = data.icon;
delete data.icon;
const badge = data.badge;
delete data.badge;
event.waitUntil(
self.registration.showNotification(title, { body, tag, data })
self.registration.showNotification(title, { body, tag, data, icon, badge })
);
} else if (tag) {
event.waitUntil(

View File

@@ -528,6 +528,7 @@ async function enableDefaultPlugins() {
'nodebb-plugin-composer-default',
'nodebb-plugin-markdown',
'nodebb-plugin-mentions',
'nodebb-plugin-web-push',
'nodebb-widget-essentials',
'nodebb-rewards-essentials',
'nodebb-plugin-emoji',

View File

@@ -127,7 +127,7 @@ Notifications.findRelated = async function (mergeIds, set) {
return [];
}
// A related notification is one in a zset that has the same mergeId
const nids = await db.getSortedSetRevRange(set, 0, -1);
const nids = await db.getSortedSetMembers(set);
const keys = nids.map(nid => `notifications:${nid}`);
const notificationData = await db.getObjectsFields(keys, ['mergeId']);