git ssb

7+

dinoworm ๐Ÿ› / patchcore



Commit 069b24d7b8bdc1dcc7a8921390f0733123b41515

Merge pull request #31 from ssbc/about-sync-shortFeedId

introduce about.sync.shortFeedId for the id slice
Matt McKegg authored on 9/13/2017, 1:02:22 AM
GitHub committed on 9/13/2017, 1:02:22 AM
Parent: 50ccb6d724fb7b397e2736bf5f6642d920709c7a
Parent: 6b7110119df34ef12c2c68b320ccf88a74684fac

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