From a9e06b4bb4998dd8d49719b457f4ac031dcc44c8 Mon Sep 17 00:00:00 2001 From: Anders Rune Jensen Date: Fri, 21 Apr 2017 21:26:06 +0200 Subject: [PATCH] Fix crash when voting on a non-msg link --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6d39f53..6176a50 100644 --- a/index.js +++ b/index.js @@ -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