git ssb

10+

Matt McKegg / patchwork



Commit fcfbae5c6e775a1476eccf472297cdd5828a686e

correctly handle mentions on secret-blobs

Matt McKegg committed on 4/13/2018, 10:34:51 AM
Parent: b0d0023156505d649f8c12faf827dd3d345a64d1

Files changed

modules/message/html/compose.jschanged
package.jsonchanged
modules/message/html/compose.jsView
@@ -8,8 +8,9 @@
88 var mentions = require('ssb-mentions')
99 var extend = require('xtend')
1010 var addSuggest = require('suggest-box')
1111 var emoji = require('emojilib')
12+var ref = require('ssb-ref')
1213
1314 exports.needs = nest({
1415 'blob.html.input': 'first',
1516 'profile.async.suggest': 'first',
@@ -76,11 +77,12 @@
7677 return
7778 }
7879
7980 files.push(file)
80- filesById[file.link] = file
8181
8282 var embed = file.type.indexOf('image/') === 0 ? '!' : ''
83+ var blob = ref.parseBlob(file.link)
84+ filesById[blob.id] = file
8385 var pos = textArea.selectionStart
8486 var before = textArea.value.slice(0, pos)
8587 var after = textArea.value.slice(pos)
8688
package.jsonView
@@ -66,13 +66,13 @@
6666 "ssb-client": "4.5.2",
6767 "ssb-config": "^2.2.0",
6868 "ssb-friends": "^2.3.5",
6969 "ssb-keys": "^7.0.13",
70- "ssb-mentions": "^0.4.0",
70+ "ssb-mentions": "github:ssbc/ssb-mentions#private-blobs",
7171 "ssb-msgs": "^5.2.0",
7272 "ssb-private": "0.1.4",
7373 "ssb-query": "^1.0.0",
74- "ssb-ref": "^2.9.0",
74+ "ssb-ref": "github:ssbc/ssb-ref#secret-blobs",
7575 "ssb-sort": "^1.0.0",
7676 "ssb-ws": "~2.1.1",
7777 "standard": "^11.0.1",
7878 "statistics": "^3.3.0",

Built with git-ssb-web