| | 57 | if ($self->conf->{fetch_body}) { |
|---|
| | 58 | $context->log(info => "Fetch body from $msg->{link}"); |
|---|
| | 59 | Time::HiRes::sleep( $self->conf->{fetch_body_interval} || 1.0 ); |
|---|
| | 60 | my($item) = $self->{mixi}->get_view_diary($msg->{link}); |
|---|
| | 61 | if ($item) { |
|---|
| | 62 | my $body = decode('euc-jp', $item->{description}); |
|---|
| | 63 | for my $image (@{ $item->{images} }) { |
|---|
| | 64 | # xxx this should be $entry->enclosures |
|---|
| | 65 | $body .= qq(<div><a href="$image->{link}"><img src="$image->{thumb_link}" style="border:0" /></a></div>); |
|---|
| | 66 | } |
|---|
| | 67 | $entry->body($body); |
|---|
| | 68 | } |
|---|
| | 69 | } |
|---|
| | 70 | |
|---|