aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/serve.js b/lib/serve.js
index fc8aa7b..f975f4b 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1109,7 +1109,7 @@ Serve.prototype.type = function (path) {
}
pull(
- this.app.sbot.messagesByType(opts),
+ this.app.sbotMessagesByType(opts),
this.renderThreadPaginated(opts, null, q),
this.wrapMessages(),
this.wrapType(type),
@@ -1204,7 +1204,7 @@ Serve.prototype.streamThreadWithComposer = function (opts) {
self.getMsgDecryptedMaybeOoo(id, function (err, rootMsg) {
if (err && err.name === 'NotFoundError') err = null, rootMsg = {
key: id, value: {content: false}}
- if (err) return cb(new Error(err.stack))
+ if (err) return cb(new Error(err.stack || err))
if (!rootMsg) {
console.log('id', id, 'opts', opts)
}
@@ -1224,7 +1224,7 @@ Serve.prototype.streamThreadWithComposer = function (opts) {
self.app.unboxMessages(),
pull.through(function (msg) {
var c = msg && msg.value.content
- if (!channel && c.channel) channel = c.channel
+ if (!channel && c && c.channel) channel = c.channel
}),
pull.collect(function (err, links) {
if (err) return gotLinks(err)
@@ -1290,11 +1290,11 @@ Serve.prototype.userFeed = function (id, path) {
self.app.getAbout(id, function (err, about) {
if (err) self.app.error(err)
pull(
- self.app.sbot.createUserStream(opts),
+ self.app.sbotCreateUserStream(opts),
self.renderThreadPaginated(opts, id, q),
self.wrapMessages(),
self.wrapUserFeed(isScrolled, id),
- self.wrapPage(about.name || id),
+ self.wrapPage(about && about.name || id),
self.respondSink(200)
)
})