git ssb

7+

dinoworm ๐Ÿ› / patchcore



Commit 6b7110119df34ef12c2c68b320ccf88a74684fac

introduce about.sync.shortFeedId for the id slice

Andre Staltz committed on 9/12/2017, 1:14:17 PM
Parent: af2008b48a9d597cb4374d5e2fb4523a29106aa1

Files changed

about/obs.jschanged
about/sync.jsadded
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+};

Built with git-ssb-web