diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-06-17 20:21:44 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-06-17 20:21:44 +0300 |
commit | f245b6b7faa29b4f276527daca48c305fe9689c1 (patch) | |
tree | 01db3252bba00b5a892731e606b0bf346ff69379 /sandstorm.js | |
parent | ad87f9ff4e50e8b042735ad383c5c193e30fc9aa (diff) | |
download | wekan-f245b6b7faa29b4f276527daca48c305fe9689c1.tar.gz wekan-f245b6b7faa29b4f276527daca48c305fe9689c1.tar.bz2 wekan-f245b6b7faa29b4f276527daca48c305fe9689c1.zip |
Update users.js etc with global search replace, to try to fix selecting correct user.
Thanks to xet7 !
Diffstat (limited to 'sandstorm.js')
-rw-r--r-- | sandstorm.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sandstorm.js b/sandstorm.js index de386d14..34b1e507 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -175,7 +175,7 @@ if (isSandstorm && Meteor.isServer) { const users = {}; function ensureUserListed(userId) { if (!users[userId]) { - const user = Meteor.users.findOne(userId); + const user = Users.findOne(userId); if (user) { users[userId] = { id: user.services.sandstorm.id }; } else { @@ -217,7 +217,7 @@ if (isSandstorm && Meteor.isServer) { 'userId', ); (comment.text.match(/\B@([\w.]*)/g) || []).forEach(username => { - const user = Meteor.users.findOne({ + const user = Users.findOne({ username: username.slice(1), }); if (user && activeMembers.indexOf(user._id) !== -1) { @@ -368,7 +368,7 @@ if (isSandstorm && Meteor.isServer) { if (newMethods[key].auth) { newMethods[key].auth = function() { const sandstormID = this.req.headers['x-sandstorm-user-id']; - const user = Meteor.users.findOne({ + const user = Users.findOne({ 'services.sandstorm.id': sandstormID, }); return user && user._id; |