Commit 73f5c0e2cbea24e8a586237edc96377e1fe63c4b
Include feed names in search results
Include all about messagescel committed on 11/10/2016, 1:38:20 AM
Parent: ec6a98cd05895ae47663f667e8b33f9d5a62721e
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -790,13 +790,12 @@ | ||
790 | 790 … | |
791 | 791 … | var search = new RegExp(q, 'i') |
792 | 792 … | return this.serveTemplate(req, req._t('Search') + ' · ' + q, 200)( |
793 | 793 … | this.renderFeed(req, null, function (opts) { |
794 | - opts.type == 'about' | |
795 | 794 … | return function (read) { |
796 | 795 … | return pull( |
797 | 796 … | many([ |
798 | - self.getRepoNames(opts), | |
797 … | + self.getMsgs('about', opts), | |
799 | 798 … | read |
800 | 799 … | ]), |
801 | 800 … | pull.filter(function (msg) { |
802 | 801 … | var c = msg.value.content |
@@ -811,21 +810,15 @@ | ||
811 | 810 … | }) |
812 | 811 … | ) |
813 | 812 … | } |
814 | 813 … | |
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 … | + }) | |
828 | 821 … | } |
829 | 822 … | |
830 | 823 … | G.serveBlobNotFound = function (req, repoId, err) { |
831 | 824 … | return this.serveTemplate(req, req._t('error.BlobNotFound'), 404)(pull.once( |
Built with git-ssb-web