Commit af8e9b0bc28f9eb27558912de8569872ffa19022
restore thing which only auto-invites for new users
mix irving committed on 5/29/2018, 2:40:27 AMParent: 2d9c04497ae27569166c3fce934b7c17eee3753b
Files changed
app/html/app.js | changed |
app/html/app.js | ||
---|---|---|
@@ -1,6 +1,6 @@ | ||
1 | 1 | const nest = require('depnest') |
2 | -const { h, Value, onceTrue } = require('mutant') | |
2 | +const { h, Value } = require('mutant') | |
3 | 3 | |
4 | 4 | exports.gives = nest('app.html.app') |
5 | 5 | |
6 | 6 | exports.needs = nest({ |
@@ -14,10 +14,9 @@ | ||
14 | 14 | 'settings.sync.get': 'first', |
15 | 15 | 'settings.sync.set': 'first', |
16 | 16 | 'invite.async.autofollow': 'first', |
17 | 17 | 'config.sync.load': 'first', |
18 | - 'sbot.async.friendsGet': 'first', | |
19 | - 'sbot.async.get': 'first', | |
18 | + 'sbot.async.friendsGet': 'first' | |
20 | 19 | }) |
21 | 20 | |
22 | 21 | exports.create = (api) => { |
23 | 22 | var view |
@@ -84,17 +83,17 @@ | ||
84 | 83 | console.log('no invites') |
85 | 84 | return |
86 | 85 | } |
87 | 86 | |
88 | - useInvites(invites) | |
87 | + // useInvites(invites) | |
89 | 88 | // TODO change it so that if you already have a bunch of friends you unfollow the pubs after they follow you? |
90 | 89 | |
91 | - // var myKey = api.config.sync.load().keys.id | |
92 | - // api.sbot.async.friendsGet({dest: myKey}, function (err, friends) { | |
93 | - // // if you have less than 5 followers, maybe use the autoinvite | |
94 | - // if (Object.keys(friends).length <= 5) useInvites(invites) | |
95 | - // else console.log('no autoinvite - you have friends already') | |
96 | - // }) | |
90 | + var myKey = api.config.sync.load().keys.id | |
91 | + api.sbot.async.friendsGet({dest: myKey}, function (err, friends) { | |
92 | + // if you have less than 5 followers, use the autoinvite | |
93 | + if (Object.keys(friends).length <= 5) useInvites(invites) | |
94 | + else console.log('no autoinvite - you have friends already') | |
95 | + }) | |
97 | 96 | |
98 | 97 | function useInvites (invites) { |
99 | 98 | invites.forEach(invite => { |
100 | 99 | console.log('using invite:', invite) |
Built with git-ssb-web