Changeset 65c2b3c for perl/modules/Facebook/lib/BarnOwl/Module
- Timestamp:
- Sep 20, 2011, 11:15:32 PM (13 years ago)
- Branches:
- master, release-1.10, release-1.9
- Children:
- 01d186f
- Parents:
- 8b62088
- git-author:
- Edward Z. Yang <ezyang@mit.edu> (06/22/11 18:42:02)
- git-committer:
- Edward Z. Yang <ezyang@mit.edu> (09/20/11 23:15:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm
r8b62088 r65c2b3c 270 270 my $post_id = $post->{id}; 271 271 272 # Only handle post if it's new273 my $created_time = str2time($post->{created_time});274 if ($created_time >= $self->{last_poll}){272 if (defined $old_topics->{$post_id}) { 273 $self->{topics}->{$post_id} = $old_topics->{$post_id}; 274 } else { 275 275 my @keywords = keywords($post->{name} || $post->{message}); 276 276 my $topic = $keywords[0] || 'personal'; 277 277 $topic =~ s/ /-/g; 278 278 $self->{topics}->{$post_id} = $topic; 279 } 280 281 # Only handle post if it's new 282 my $created_time = str2time($post->{created_time}); 283 if ($created_time >= $self->{last_poll}) { 279 284 # XXX indexing is fragile 280 285 my $msg = BarnOwl::Message->new( … … 286 291 direction => 'in', 287 292 body => $self->format_body($post), 288 post_id 289 topic => $ topic,293 post_id => $post_id, 294 topic => $self->get_topic($post_id), 290 295 time => asctime(localtime $created_time), 291 296 # XXX The intent is to get the 'Comment' link, which also … … 295 300 ); 296 301 BarnOwl::queue_message($msg); 297 } else {298 $self->{topics}->{$post_id} = $old_topics->{$post_id} || 'personal';299 302 } 300 303
Note: See TracChangeset
for help on using the changeset viewer.