mirror of
https://github.com/wekan/wekan.git
synced 2026-01-24 02:06:10 +01:00
Fixed Add member and @mentions.
Thanks to xet7 ! Fixes #6076, fixes #6077
This commit is contained in:
parent
603a65ef17
commit
ad511bd137
14 changed files with 413 additions and 149 deletions
|
|
@ -1,5 +1,15 @@
|
|||
Meteor.startup(() => {
|
||||
Notifications.subscribe('profile', (user, title, description, params) => {
|
||||
user.addNotification(params.activityId);
|
||||
try {
|
||||
// Validate user object before processing
|
||||
if (!user || !user._id) {
|
||||
console.error('Invalid user object in notification:', { user, title, params });
|
||||
return;
|
||||
}
|
||||
const modifier = user.addNotification(params.activityId);
|
||||
Users.direct.update(user._id, modifier);
|
||||
} catch (error) {
|
||||
console.error('Error adding notification:', error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue