Commit fcfbae5c6e775a1476eccf472297cdd5828a686e
correctly handle mentions on secret-blobs
Matt McKegg committed on 4/13/2018, 10:34:51 AMParent: b0d0023156505d649f8c12faf827dd3d345a64d1
Files changed
modules/message/html/compose.js | changed |
package.json | changed |
modules/message/html/compose.js | ||
---|---|---|
@@ -8,8 +8,9 @@ | ||
8 | 8 | var mentions = require('ssb-mentions') |
9 | 9 | var extend = require('xtend') |
10 | 10 | var addSuggest = require('suggest-box') |
11 | 11 | var emoji = require('emojilib') |
12 | +var ref = require('ssb-ref') | |
12 | 13 | |
13 | 14 | exports.needs = nest({ |
14 | 15 | 'blob.html.input': 'first', |
15 | 16 | 'profile.async.suggest': 'first', |
@@ -76,11 +77,12 @@ | ||
76 | 77 | return |
77 | 78 | } |
78 | 79 | |
79 | 80 | files.push(file) |
80 | - filesById[file.link] = file | |
81 | 81 | |
82 | 82 | var embed = file.type.indexOf('image/') === 0 ? '!' : '' |
83 | + var blob = ref.parseBlob(file.link) | |
84 | + filesById[blob.id] = file | |
83 | 85 | var pos = textArea.selectionStart |
84 | 86 | var before = textArea.value.slice(0, pos) |
85 | 87 | var after = textArea.value.slice(pos) |
86 | 88 |
package.json | ||
---|---|---|
@@ -66,13 +66,13 @@ | ||
66 | 66 | "ssb-client": "4.5.2", |
67 | 67 | "ssb-config": "^2.2.0", |
68 | 68 | "ssb-friends": "^2.3.5", |
69 | 69 | "ssb-keys": "^7.0.13", |
70 | - "ssb-mentions": "^0.4.0", | |
70 | + "ssb-mentions": "github:ssbc/ssb-mentions#private-blobs", | |
71 | 71 | "ssb-msgs": "^5.2.0", |
72 | 72 | "ssb-private": "0.1.4", |
73 | 73 | "ssb-query": "^1.0.0", |
74 | - "ssb-ref": "^2.9.0", | |
74 | + "ssb-ref": "github:ssbc/ssb-ref#secret-blobs", | |
75 | 75 | "ssb-sort": "^1.0.0", |
76 | 76 | "ssb-ws": "~2.1.1", |
77 | 77 | "standard": "^11.0.1", |
78 | 78 | "statistics": "^3.3.0", |
Built with git-ssb-web