diff options
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 30 |
1 files changed, 1 insertions, 29 deletions
@@ -54,8 +54,7 @@ function App(sbot, config) { // sha256('peer-invites:DEVELOPMENT') */ - var host1 = /:/.test(this.host) ? '[' + this.host + ']' : this.host - this.baseUrl = 'http://' + host1 + ':' + this.port + this.hostname = (/:/.test(this.host) ? '[' + this.host + ']' : this.host) + this.port this.dir = path.join(config.path, conf.dir || 'patchfoo') this.scriptDir = path.join(this.dir, conf.scriptDir || 'script') this.draftsDir = path.join(this.dir, conf.draftsDir || 'drafts') @@ -283,33 +282,6 @@ App.prototype.getMsgDecryptedOoo = function (key, cb) { }) } -App.prototype.publishMayRedirect = function (content, cb) { - var publishguard = this.sbot.publishguard - if (Array.isArray(content.recps)) { - var recps = content.recps.map(u.linkDest) - if (publishguard && publishguard.privatePublishGetUrl) { - return publishguard.privatePublishGetUrl({ - content: content, - recps: recps, - redirectBase: this.baseUrl + '/' - }, onPublishGetUrl) - } - this.privatePublish(content, recps, cb) - } else { - if (publishguard && publishguard.publishGetUrl) { - return publishguard.publishGetUrl({ - content: content, - redirectBase: this.baseUrl + '/' - }, onPublishGetUrl) - } - this.sbot.publish(content, cb) - } - function onPublishGetUrl(err, url) { - if (err) return cb(err) - cb({redirectUrl: url}) - } -} - App.prototype.privatePublish = function (content, recps, cb) { if (this.private && typeof this.private.publish === 'function') { return this.sbot.private.publish(content, recps, cb) |