index.jsView |
---|
136 | 136 | paramap(addBlog, 8), |
137 | 137 | paramap(addFollowAbout, 8), |
138 | 138 | paramap(addVoteMessage, 8), |
139 | 139 | paramap(addGitLinks, 8), |
| 140 | + paramap(addGatheringAbout, 8), |
140 | 141 | render(), |
141 | 142 | toPull(res, function (err) { |
142 | 143 | if (err) console.error('[viewer]', err) |
143 | 144 | }) |
241 | 242 | paramap(addBlog, 8), |
242 | 243 | paramap(addFollowAbout, 8), |
243 | 244 | paramap(addVoteMessage, 8), |
244 | 245 | paramap(addGitLinks, 8), |
| 246 | + paramap(addGatheringAbout, 8), |
245 | 247 | pull(renderThread(feedOpts), wrapPage(name)), |
246 | 248 | toPull(res, function (err) { |
247 | 249 | if (err) console.error('[viewer]', err) |
248 | 250 | }) |
267 | 269 | pull( |
268 | 270 | pull.values(logs), |
269 | 271 | paramap(addAuthorAbout, 8), |
270 | 272 | paramap(addBlog, 8), |
271 | | - paramap(addVoteMessage, 8), |
| 273 | + paramap(addVoteMessage, 8), |
| 274 | + paramap(addGatheringAbout, 8), |
272 | 275 | pull(renderThread(defaultOpts, '', renderShowAll(showAll, req.url)), |
273 | 276 | wrapPage('#' + channelId)), |
274 | 277 | toPull(res, function (err) { |
275 | 278 | if (err) console.error('[viewer]', err) |
323 | 326 | pull( |
324 | 327 | pull.values(sort(links)), |
325 | 328 | paramap(addAuthorAbout, 8), |
326 | 329 | paramap(addBlog, 8), |
| 330 | + paramap(addGatheringAbout, 8), |
327 | 331 | format, |
328 | 332 | toPull(res, function (err) { |
329 | 333 | if (err) console.error('[viewer]', err) |
330 | 334 | }) |
391 | 395 | cb(null, msg) |
392 | 396 | }) |
393 | 397 | } |
394 | 398 | |
| 399 | + function addGatheringAbout(msg, cb) { |
| 400 | + if (msg.value && msg.value.content.type === 'gathering') { |
| 401 | + console.log('adding gathering abouts. msg:', msg) |
| 402 | + getAbout(msg.key, (err, about) => { |
| 403 | + if (err) { return cb(err) } |
| 404 | + |
| 405 | + msg.value.content.about = about |
| 406 | + console.log('about gathering', about) |
| 407 | + cb(null, msg) |
| 408 | + }) |
| 409 | + } else { |
| 410 | + cb(null, msg) |
| 411 | + } |
| 412 | + } |
| 413 | + |
395 | 414 | function addGitLinks(msg, cb) { |
396 | 415 | if (msg.value.content.type == 'git-update') |
397 | 416 | getMsg(msg.value.content.repo, function (err, gitRepo) { |
398 | 417 | if (gitRepo) |