Skip to content

Commit

Permalink
WIP: Do not create Citizen OS UserConnection activity, adds no value,…
Browse files Browse the repository at this point in the history
… basically duplicates Google/FB User connection creation - citizenos/citizenos-fe#112
  • Loading branch information
tiblu committed Nov 13, 2019
1 parent f13d048 commit 8aa3bc9
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions libs/passport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ module.exports = function (app) {
{transaction: t}
)
.then(function (uc) {

return cosActivities.addActivity(uc, {
type: 'User',
id: user.id,
Expand All @@ -137,14 +136,6 @@ module.exports = function (app) {
connectionData: user
},
transaction: t
})
.then(function (ucCos, ucCoscreated) {
if (ucCoscreated) {
return cosActivities.addActivity(ucCos, {
type: 'User',
id: user.id
}, null, user, req.method + ' ' + req.path, t);
}
});
})
.then(function () {
Expand Down Expand Up @@ -254,7 +245,6 @@ module.exports = function (app) {
{transaction: t}
)
.then(function (uc) {

return cosActivities.addActivity(uc, {
type: 'User',
id: user.id,
Expand All @@ -278,15 +268,7 @@ module.exports = function (app) {
},
transaction: t
}
)
.then(function (ucCos, created) {
if (created) {
return cosActivities.addActivity(ucCos, {
type: 'User',
id: user.id
}, null, user, 'GET ' + config.passport.facebook.callbackUrl, t);
}
});
);
})
.then(function () {
if (!user.imageUrl) {
Expand Down

0 comments on commit 8aa3bc9

Please sign in to comment.