fix: notification on group.leave incorrectly showing "Guest has left X group"

This commit is contained in:
psychobunny
2020-12-01 13:57:51 -05:00
parent 2c9cd2864c
commit f7558c6052

View File

@@ -156,6 +156,7 @@ groupsAPI.leave = async function (caller, data) {
bodyShort: '[[groups:membership.leave.notification_title, ' + username + ', ' + groupName + ']]', bodyShort: '[[groups:membership.leave.notification_title, ' + username + ', ' + groupName + ']]',
nid: 'group:' + validator.escape(groupName) + ':uid:' + data.uid + ':group-leave', nid: 'group:' + validator.escape(groupName) + ':uid:' + data.uid + ':group-leave',
path: '/groups/' + slugify(groupName), path: '/groups/' + slugify(groupName),
from: data.uid,
}); });
const uids = await groups.getOwners(groupName); const uids = await groups.getOwners(groupName);
await notifications.push(notification, uids); await notifications.push(notification, uids);