git ssb

30+

cel / git-ssb-web



Commit 73f5c0e2cbea24e8a586237edc96377e1fe63c4b

Include feed names in search results

Include all about messages
cel committed on 11/10/2016, 1:38:20 AM
Parent: ec6a98cd05895ae47663f667e8b33f9d5a62721e

Files changed

index.jschanged
index.jsView
@@ -790,13 +790,12 @@
790790
791791 var search = new RegExp(q, 'i')
792792 return this.serveTemplate(req, req._t('Search') + ' · ' + q, 200)(
793793 this.renderFeed(req, null, function (opts) {
794- opts.type == 'about'
795794 return function (read) {
796795 return pull(
797796 many([
798- self.getRepoNames(opts),
797 + self.getMsgs('about', opts),
799798 read
800799 ]),
801800 pull.filter(function (msg) {
802801 var c = msg.value.content
@@ -811,21 +810,15 @@
811810 })
812811 )
813812 }
814813
815-G.getRepoNames = function (opts) {
816- return pull(
817- this.ssb.messagesByType({
818- type: 'about',
819- reverse: opts.reverse,
820- lt: opts.lt,
821- gt: opts.gt,
822- }),
823- pull.filter(function (msg) {
824- return '%' == String(msg.value.content.about)[0]
825- && msg.value.content.name
826- })
827- )
814 +G.getMsgs = function (type, opts) {
815 + return this.ssb.messagesByType({
816 + type: type,
817 + reverse: opts.reverse,
818 + lt: opts.lt,
819 + gt: opts.gt,
820 + })
828821 }
829822
830823 G.serveBlobNotFound = function (req, repoId, err) {
831824 return this.serveTemplate(req, req._t('error.BlobNotFound'), 404)(pull.once(

Built with git-ssb-web