aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/app.js1
-rw-r--r--lib/render-msg.js2
-rw-r--r--lib/serve.js3
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/app.js b/lib/app.js
index 031077f..cb5075d 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -39,6 +39,7 @@ function App(sbot, config) {
this.previewVotes = conf.previewVotes == null ? false : conf.previewVotes
this.previewContacts = conf.previewContacts == null ? false : conf.previewContacts
this.useOoo = conf.ooo == null ? false : conf.ooo
+ this.ssbPort = 8008
var host1 = /:/.test(this.host) ? '[' + this.host + ']' : this.host
this.baseUrl = 'http://' + host1 + ':' + this.port
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 9e33be6..2f265b9 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -751,7 +751,7 @@ RenderMsg.prototype.pub = function (cb) {
if (err) return cb(err)
self.wrapMini([
'connects to ', pubLink, ' at ',
- h('code', addr.host + ':' + addr.port)], cb)
+ h('code', addr.host + (addr.port === self.app.ssbPort ? '' : ':' + addr.port))], cb)
})
}
diff --git a/lib/serve.js b/lib/serve.js
index 61e34da..11e451a 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -4129,6 +4129,7 @@ Serve.prototype.pub = function (path) {
var id = String(path).substr(1)
try { id = decodeURIComponent(id) }
catch(e) {}
+ var portRegexp = new RegExp(':' + self.app.ssbPort + '$')
pull(
ph('section', [
ph('h3', ['Pub addresses: ', self.phIdLink(id)]),
@@ -4136,7 +4137,7 @@ Serve.prototype.pub = function (path) {
self.app.getAddresses(id),
pull.map(function (address) {
return ph('div', [
- ph('code', address)
+ ph('code', address.replace(portRegexp, ''))
])
})
)