git ssb

7+

dinoworm ๐Ÿ› / patchcore



Commit 4e0dae39f1a245880675dff53fc9bfff65262448

Merge branch 'master' of github.com:ssbc/patchcore into contact_blocking

mix irving committed on 9/14/2017, 12:35:35 AM
Parent: 7bd9775b75c52ca02f3e47ccb20e59533accb156
Parent: 80c1f8b2d9deccfbefd2ceb690fd4255b3626c94

Files changed

about/obs.jschanged
about/sync.jsadded
contact/async.jschanged
invite.jschanged
package-lock.jsonchanged
package.jsonchanged
about/obs.jsView
@@ -7,8 +7,9 @@
77
88 exports.needs = nest({
99 'sbot.pull.stream': 'first',
1010 'blob.sync.url': 'first',
11+ 'about.sync.shortFeedId': 'first',
1112 'keys.sync.id': 'first'
1213 })
1314
1415 exports.gives = nest({
@@ -34,9 +35,9 @@
3435
3536 return nest({
3637 'about.obs': {
3738 // quick helpers, probably should deprecate!
38- name: (id) => socialValue(id, 'name', id.slice(1, 10)),
39+ name: (id) => socialValue(id, 'name', api.about.sync.shortFeedId(id)),
3940 description: (id) => socialValue(id, 'description'),
4041 image: (id) => socialValue(id, 'image'),
4142 names: (id) => groupedValues(id, 'name'),
4243 images: (id) => groupedValues(id, 'image'),
about/sync.jsView
@@ -1,0 +1,9 @@
1+var nest = require('depnest')
2+
3+exports.gives = nest('about.sync.shortFeedId')
4+
5+exports.create = function (api) {
6+ return nest('about.sync.shortFeedId', function (id) {
7+ return id.slice(1, 10)
8+ })
9+}
contact/async.jsView
@@ -56,7 +56,6 @@
5656 contact: id,
5757 blocking: false
5858 }, cb)
5959 }
60-
6160 }
6261
invite.jsView
@@ -13,9 +13,9 @@
1313 })
1414
1515 exports.gives = nest({
1616 'invite.async.accept': true,
17- 'invite.async.autofollow': true,
17+ 'invite.async.autofollow': true
1818 })
1919
2020 exports.create = function (api) {
2121 function accept (invite, cb) {
@@ -79,15 +79,15 @@
7979 return progress
8080 }
8181 return nest({
8282 'invite.async.accept': accept,
83- //like invite, but check whether we already follow them first
83+ // like invite, but check whether we already follow them first
8484 'invite.async.autofollow': function (invite, cb) {
8585 var id = api.keys.sync.id()
8686 var data = ref.parseInvite(invite)
8787 api.contact.async.followerOf(id, data.key, function (_, follows) {
8888 if (follows) console.log('already following', cb())
89- else console.log('accept invite:'+invite, accept(invite, cb))
89+ else console.log('accept invite:' + invite, accept(invite, cb))
9090 })
9191 }
9292 })
9393 }
package-lock.jsonView
@@ -1,7 +1,7 @@
11 {
22 "name": "patchcore",
3- "version": "1.10.3",
3+ "version": "1.11.0",
44 "lockfileVersion": 1,
55 "requires": true,
66 "dependencies": {
77 "acorn": {
package.jsonView
@@ -1,7 +1,7 @@
11 {
22 "name": "patchcore",
3- "version": "1.10.3",
3+ "version": "1.11.0",
44 "description": "minimal core for ssb clients",
55 "main": "index.js",
66 "scripts": {
77 "start": "electro example",

Built with git-ssb-web