diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-11-16 11:01:20 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-11-16 11:01:43 -0500 |
commit | 5a8a31c7e4523ef4de4c20e28443f9ea18961ce4 (patch) | |
tree | ada939815c5f4e20d1ea7eef20a8ae64ed3a2817 /lib | |
parent | 3652f333b559c988ab93f1454a240588b47a598f (diff) | |
download | patchfoo-5a8a31c7e4523ef4de4c20e28443f9ea18961ce4.tar.gz patchfoo-5a8a31c7e4523ef4de4c20e28443f9ea18961ce4.zip |
Allow specifying img_base without prefix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 2 | ||||
-rw-r--r-- | lib/render.js | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -34,7 +34,7 @@ function App(sbot, config) { this.opts = { base: base, blob_base: conf.blob_base || conf.img_base || base, - img_base: conf.img_base || base, + img_base: conf.img_base || (base + 'image/'), emoji_base: conf.emoji_base || (base + 'emoji/'), encode_msgids: conf.encode_msgids == null ? true : Boolean(conf.encode_msgids), } diff --git a/lib/render.js b/lib/render.js index c43ee76..ed011bb 100644 --- a/lib/render.js +++ b/lib/render.js @@ -146,7 +146,7 @@ Render.prototype.imageUrl = function (ref) { var m = /^blobstore:(.*)/.exec(ref) if (m) ref = m[1] ref = ref.replace(/#/, '%23') - return this.opts.img_base + 'image/' + ref + return this.opts.img_base + ref } Render.prototype.getImageAlt = function (id, fallback) { |