Skip to content

Commit b0e203a

Browse files
committed
Merge pull request #4 from firesock/master
Correctly check if there is a response from server for tweet links
2 parents 49355ff + b00c4b6 commit b0e203a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎earl.pl‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ sub get_tweet {
187187
@text_array[$indices[0]..($indices[1] - 1)] = @replace_array;
188188
$text_array[$indices[0]] = $ent_url;
189189

190-
next unless my (undef, $ent_response) = get_simple_response($ent_url);
191-
push(@text_array, (" > ", $ent_response));
190+
my (undef, $ent_response) = get_simple_response($ent_url);
191+
push(@text_array, (" > ", $ent_response)) if $ent_response;
192192
}
193193
}
194194

@@ -214,8 +214,8 @@ sub said {
214214
for $url ( list_uris( $args->{body} ) ) {
215215
next unless $url =~ /^http/i;
216216

217-
if ( my ($url, $reply) = get_response( $url ) ) {
218-
next unless $url and $reply;
217+
my ($url, $reply) = get_response( $url );
218+
if ( $url and $reply ) {
219219

220220
# Sanitise the reply to only include printable chars
221221
$reply =~ s/[^[:print:]]//g;

0 commit comments

Comments
 (0)