Fix crash when voting on a non-msg link
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user