Changeset 1943
- Timestamp:
- 04/15/07 22:25:34
- Files:
-
- trunk/plagger (modified) (previous)
- trunk/plagger/lib/Plagger/Plugin/Publish/Twitter.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Publish/Twitter.pm
r1942 r1943 3 3 use base qw( Plagger::Plugin ); 4 4 5 use Encode; 5 6 use Net::Twitter; 6 7 … … 29 30 my($self, $context, $args) = @_; 30 31 31 my $body = ( $args->{entry}->summary || $args->{entry}->title ) . " " . $args->{entry}->permalink; 32 my $body = ( $args->{entry}->summary->plaintext || $args->{entry}->title ) . " " . $args->{entry}->permalink; 33 # TODO: FIX when Summary configurable. 34 if ( length($body) > 159 ) { 35 $body = substr($body, 0, 159); 36 } 32 37 $context->log(info => "Updating Twitter status to '$body'"); 33 $self->{twitter}->update( $body) or $context->error("Can't update twitter status");38 $self->{twitter}->update( encode_utf8($body) ) or $context->error("Can't update twitter status"); 34 39 } 35 40
