git ssb

16+

cel / patchfoo



Commit f826bdf13d9bbdfd31a38bfdff382106b8edfd52

Don't crash on missing message

cel committed on 5/15/2017, 7:24:25 PM
Parent: 24417ffb7f896971664053a13101154e40d6adce

Files changed

lib/serve.jschanged
lib/serve.jsView
@@ -751,9 +751,10 @@
751751 var self = this
752752 if (self.query.raw != null) return self.rawId(id)
753753
754754 this.app.getMsgDecrypted(id, function (err, rootMsg) {
755- if (err && err.name === 'NotFoundError') err = null, rootMsg = {key: id}
755 + if (err && err.name === 'NotFoundError') err = null, rootMsg = {
756 + key: id, value: {content: false}}
756757 if (err) return self.respond(500, err.stack || err)
757758 var rootContent = rootMsg && rootMsg.value && rootMsg.value.content
758759 var recps = rootContent && rootContent.recps
759760 var threadRootId = rootContent && rootContent.root || id

Built with git-ssb-web