Fix crash when voting on a non-msg link

This commit is contained in:
Anders Rune Jensen
2017-04-21 21:26:06 +02:00
parent 16d0981db7
commit a9e06b4bb4
+1 -1
View File
@@ -272,7 +272,7 @@ exports.init = function (sbot, config) {
}
function addVoteMessage(msg, cb) {
if (msg.value.content.type == 'vote')
if (msg.value.content.type == 'vote' && msg.value.content.vote.link[0] == '%')
getMsg(msg.value.content.vote.link, function (err, linkedMsg) {
if (err) return cb(err)
msg.value.content.vote.linkedText = linkedMsg.value.content.text