git ssb

16+

Dominic / patchbay



Commit 0131ecbd3cc024a9049c5dab91ce05c70613dcd5

support image embeds

Dominic Tarr committed on 5/12/2016, 9:33:19 AM
Parent: 96d0a60a7b7c41087f0c52c4ed0292f86ba7d4b1

Files changed

modules/post.jschanged
package.jsonchanged
modules/post.jsView
@@ -1,7 +1,9 @@
11 var markdown = require('ssb-markdown')
22 var h = require('hyperscript')
33 var u = require('../util')
4+var ref = require('ssb-ref')
5+
46 //render a message
57
68 exports.message_content = function (data, sbot) {
79 if(!data.value.content || !data.value.content.text) return
@@ -21,8 +23,10 @@
2123 })
2224
2325 content.innerHTML =
2426 markdown.block(data.value.content.text, {toUrl: function (id) {
27+ if(ref.isBlob(id))
28+ return 'http://localhost:7777/'+encodeURIComponent(id)
2529 return '#'+(mentions[id]?mentions[id]:id)
2630 }})
2731 return d
2832 }
package.jsonView
@@ -9,10 +9,13 @@
99 },
1010 "dependencies": {
1111 "depject": "0.0.2",
1212 "hyperscript": "^1.4.7",
13+ "hypertabs": "^0.1.0",
1314 "moment": "^2.13.0",
15+ "pull-cat": "^1.1.9",
1416 "pull-paramap": "^1.1.6",
17+ "pull-sort": "^1.0.0",
1518 "pull-stream": "^3.3.2",
1619 "ssb-client": "^3.0.1",
1720 "ssb-markdown": "^3.0.0"
1821 },

Built with git-ssb-web