summaryrefslogtreecommitdiffstats
path: root/sandstorm.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-12-12 14:18:34 +0200
committerLauri Ojansivu <x@xet7.org>2017-12-12 14:18:34 +0200
commit6e8a84eaa7a4b20b7a3ee628e835f1998fb0359f (patch)
tree3b55a928ceeba0e233ebb55a0e5317293dc6c96a /sandstorm.js
parenteb9d417a278939e57ddc4a633fe3964f3bf6392b (diff)
downloadwekan-6e8a84eaa7a4b20b7a3ee628e835f1998fb0359f.tar.gz
wekan-6e8a84eaa7a4b20b7a3ee628e835f1998fb0359f.tar.bz2
wekan-6e8a84eaa7a4b20b7a3ee628e835f1998fb0359f.zip
Restore Meteot 1.4 version of sandstorm.js
Diffstat (limited to 'sandstorm.js')
-rw-r--r--sandstorm.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/sandstorm.js b/sandstorm.js
index b6bbdc67..6b7c8172 100644
--- a/sandstorm.js
+++ b/sandstorm.js
@@ -22,7 +22,7 @@ const sandstormBoard = {
if (isSandstorm && Meteor.isServer) {
const fs = require('fs');
- const Capnp = require("/node_modules/capnp.js");
+ const Capnp = require('capnp');
const Package = Capnp.importSystem('sandstorm/package.capnp');
const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp');
const Identity = Capnp.importSystem('sandstorm/identity.capnp');
@@ -73,7 +73,7 @@ if (isSandstorm && Meteor.isServer) {
session.claimRequest(token).then((response) => {
const identity = response.cap.castAs(Identity.Identity);
const promises = [api.getIdentityId(identity), identity.getProfile(),
- httpBridge.saveIdentity(identity)];
+ httpBridge.saveIdentity(identity)];
return Promise.all(promises).then((responses) => {
const identityId = responses[0].id.toString('hex').slice(0, 32);
const profile = responses[1].profile;
@@ -113,9 +113,9 @@ if (isSandstorm && Meteor.isServer) {
const identity = response.identity;
return identity.getProfile().then(() => {
return { identity,
- mentioned: !!user.mentioned,
- subscribed: !!user.subscribed,
- };
+ mentioned: !!user.mentioned,
+ subscribed: !!user.subscribed,
+ };
});
}).catch(() => {
// Ignore identities that fail to restore. Either they were added before we set
@@ -130,7 +130,7 @@ if (isSandstorm && Meteor.isServer) {
return session.activity(event);
}).then(() => done(),
- (e) => done(e));
+ (e) => done(e));
})();
}