Commit ce05fb2c50cfb9d2b323670012d96c5e7dbc8ce4
Use links2 mentions along with msg scope mentions
cel committed on 12/16/2017, 12:54:32 AMParent: c06265915b5e5980e714b509676313cf0b0bd61f
Files changed
index.js | changed |
package-lock.json | changed |
package.json | changed |
index.js | ||
---|---|---|
@@ -8,8 +8,9 @@ | ||
8 | 8 | var toPull = require('stream-to-pull-stream') |
9 | 9 | var pull = require('pull-stream') |
10 | 10 | var tar = require('tar-stream') |
11 | 11 | var zlib = require('zlib') |
12 | +var cat = require('pull-cat') | |
12 | 13 | var hash = require('pull-hash') |
13 | 14 | var multicb = require('multicb') |
14 | 15 | var memo = require('asyncmemo') |
15 | 16 | var lru = require('hashlru') |
@@ -636,9 +637,10 @@ | ||
636 | 637 | } |
637 | 638 | } |
638 | 639 | |
639 | 640 | Req.prototype.getMentions = function (name) { |
640 | - return this.headMsgId ? pull( | |
641 | + var serverMentions = this.server.getMentions(name) | |
642 | + var msgMentions = this.headMsgId ? pull( | |
641 | 643 | this.server.streamTree([this.headMsgId], 'dependencyBranch'), |
642 | 644 | // decryption could be done here |
643 | 645 | pull.map(function (msg) { |
644 | 646 | var c = msg.value && msg.value.content |
@@ -660,9 +662,10 @@ | ||
660 | 662 | return link.name.substr(0, name.$prefix.length) === name.$prefix |
661 | 663 | } : function () { |
662 | 664 | throw new TypeError('unsupported name filter') |
663 | 665 | }), |
664 | - ) : this.server.getMentions(name) | |
666 | + ) : pull.empty() | |
667 | + return cat([msgMentions, serverMentions]) | |
665 | 668 | } |
666 | 669 | |
667 | 670 | Req.prototype.getMentionLinks = function (blobId) { |
668 | 671 | return pull( |
package-lock.json | ||
---|---|---|
@@ -66,8 +66,13 @@ | ||
66 | 66 | "version": "1.0.7", |
67 | 67 | "resolved": "http://localhost:8989/blobs/get/&Z0yzuiU+O2uiIdBVjunggUeZ4SH034vsGpH7snC1UK4=.sha256", |
68 | 68 | "integrity": "sha256-Z0yzuiU+O2uiIdBVjunggUeZ4SH034vsGpH7snC1UK4=" |
69 | 69 | }, |
70 | + "pull-cat": { | |
71 | + "version": "1.1.11", | |
72 | + "resolved": "http://localhost:8989/blobs/get/&+uVE8RHNwJIJa68sQGICGbxnCTCOdLLhSt/Pb4NmgL0=.sha256", | |
73 | + "integrity": "sha256-+uVE8RHNwJIJa68sQGICGbxnCTCOdLLhSt/Pb4NmgL0=" | |
74 | + }, | |
70 | 75 | "pull-hash": { |
71 | 76 | "version": "1.0.0", |
72 | 77 | "resolved": "http://localhost:8989/blobs/get/&mVOLtd5e8OPAoi/ARUMfEkgZlHrlkPzgapIlv2a9FwI=.sha256", |
73 | 78 | "integrity": "sha256-mVOLtd5e8OPAoi/ARUMfEkgZlHrlkPzgapIlv2a9FwI=" |
Built with git-ssb-web