updated to allow json response from content url

This commit is contained in:
Eric Uldall 2019-10-25 18:15:28 -07:00
parent 3a2d1512ab
commit b2bfebe1f1

View file

@ -212,8 +212,14 @@ class MessageSender {
throw new Error(`Received status code ${httpResponse.statusCode} from ${sourceUrl}`); throw new Error(`Received status code ${httpResponse.statusCode} from ${sourceUrl}`);
} }
html = response.body; try {
text = ''; const responseJSON = JSON.parse(response.body);
html = responseJSON.html;
text = responseJSON.text;
} catch () {
html = response.body;
}
renderTags = false; renderTags = false;
} }