summaryrefslogtreecommitdiffstats
path: root/server/notifications
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2017-08-31 21:20:46 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2017-08-31 21:20:46 -0300
commit1048718f0b133944b9e46e345d9ad38bbd162b30 (patch)
tree374b853dcf2ce2f41c99f4674394ab635f54b7ea /server/notifications
parent5bc95511e56af7cb4809dd8b2e4e9aedf275d63b (diff)
downloadwekan-1048718f0b133944b9e46e345d9ad38bbd162b30.tar.gz
wekan-1048718f0b133944b9e46e345d9ad38bbd162b30.tar.bz2
wekan-1048718f0b133944b9e46e345d9ad38bbd162b30.zip
Fix null userId. Fix description field name
Diffstat (limited to 'server/notifications')
-rw-r--r--server/notifications/outgoing.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js
index a4f24f92..07a0a903 100644
--- a/server/notifications/outgoing.js
+++ b/server/notifications/outgoing.js
@@ -19,7 +19,8 @@ Meteor.methods({
if (quoteParams[key]) quoteParams[key] = `"${params[key]}"`;
});
- const user = Users.findOne(params.userId);
+ const userId = (params.userId)?params.userId:integrations[0].userId;
+ const user = Users.findOne(userId);
const text = `${params.user} ${TAPi18n.__(description, quoteParams, user.getLanguage())}\n${params.url}`;
if (text.length === 0) return;
@@ -31,7 +32,7 @@ Meteor.methods({
['cardId', 'listId', 'oldListId', 'boardId'].forEach((key) => {
if (params[key]) value[key] = params[key];
});
- value.$description = description;
+ value.description = description;
const options = {
headers: {