Fix failing thumbnails

This commit is contained in:
Mattias Erming 2014-08-18 17:06:52 -07:00
parent a904de5d7a
commit 523a9cd734
3 changed files with 6 additions and 6 deletions

View File

@ -224,9 +224,7 @@
<span class="text"> <span class="text">
<em class="type">{{type}}</em> <em class="type">{{type}}</em>
{{#equal type "image"}} {{#equal type "image"}}
<a href="{{text}}" target="_blank"> <img src="{{text}}" class="image">
<img src="{{text}}" class="image">
</a>
{{else}} {{else}}
{{{uri text}}} {{{uri text}}}
{{/equal}} {{/equal}}

View File

@ -1,7 +1,7 @@
{ {
"name": "shout", "name": "shout",
"description": "A web IRC client", "description": "A web IRC client",
"version": "0.10.1", "version": "0.10.2",
"author": "Mattias Erming", "author": "Mattias Erming",
"preferGlobal": true, "preferGlobal": true,
"bin": { "bin": {

View File

@ -56,8 +56,10 @@ function fetchImage(url, callback) {
req.on("error", function(e) { req.on("error", function(e) {
console.log(e); console.log(e);
}); });
req.on("end", function(e, res) { req.on("end", function() {
callback(name); if (this.req.res.statusCode == 200) {
callback(name);
}
}); });
}); });