diff options
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/serve.js b/lib/serve.js index abf15c3..7c42d0c 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -197,7 +197,7 @@ Serve.prototype.publishVote = function (next) { } } -Serve.prototype.publishContact = function (cb) { +Serve.prototype.publishContact = function (next) { var content = { type: 'contact', contact: this.data.contact, @@ -206,7 +206,14 @@ Serve.prototype.publishContact = function (cb) { if (this.data.block) content.blocking = true if (this.data.unfollow) content.following = false if (this.data.unblock) content.blocking = false - this.publish(content, cb) + if (this.app.previewContacts) { + var json = JSON.stringify(content, 0, 2) + var q = qs.stringify({text: json, action: 'preview'}) + var url = this.app.render.toUrl('/compose?' + q) + this.redirect(url) + } else { + this.publish(content, next) + } } Serve.prototype.publishAttend = function (cb) { |