updated to allow json response from content url
This commit is contained in:
parent
3a2d1512ab
commit
b2bfebe1f1
1 changed files with 8 additions and 2 deletions
|
@ -212,8 +212,14 @@ class MessageSender {
|
|||
throw new Error(`Received status code ${httpResponse.statusCode} from ${sourceUrl}`);
|
||||
}
|
||||
|
||||
try {
|
||||
const responseJSON = JSON.parse(response.body);
|
||||
html = responseJSON.html;
|
||||
text = responseJSON.text;
|
||||
} catch () {
|
||||
html = response.body;
|
||||
text = '';
|
||||
}
|
||||
|
||||
renderTags = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue