Commit 82c5123cafb9cea6c68aaa6559910eeef043dab0
Push public blobs on publish
Charles Lehner committed on 7/24/2016, 4:21:02 PMParent: bf5b79d17d7fcf89a7cb0ad35bff87d0c66f184a
Files changed
sbot-api.js | changed |
sbot-api.js | ||
---|---|---|
@@ -108,8 +108,16 @@ | ||
108 | 108 | if(content.recps) |
109 | 109 | content = ssbKeys.box(content, content.recps.map(function (e) { |
110 | 110 | return ref.isFeed(e) ? e : e.link |
111 | 111 | })) |
112 | + else if(content.mentions) | |
113 | + content.mentions.forEach(function (mention) { | |
114 | + if(ref.isBlob(mention.link)) { | |
115 | + sbot.blobs.push(mention.link, function (err) { | |
116 | + if(err) console.error(err) | |
117 | + }) | |
118 | + } | |
119 | + }) | |
112 | 120 | |
113 | 121 | feed.add(content, function (err, msg) { |
114 | 122 | if(err) console.error(err) |
115 | 123 | else if(!cb) console.log(msg) |
Built with git-ssb-web