Changeset eb497a9 for perl/modules/Facebook/lib/BarnOwl/Module/Facebook
- Timestamp:
- Sep 20, 2011, 11:15:31 PM (13 years ago)
- Branches:
- master, release-1.10, release-1.9
- Children:
- 44f585c
- Parents:
- 99f0a77
- git-author:
- Edward Z. Yang <ezyang@mit.edu> (06/20/11 11:43:49)
- git-committer:
- Edward Z. Yang <ezyang@mit.edu> (09/20/11 23:15:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm
r99f0a77 reb497a9 179 179 my $name = $post->{to}{data}[0]{name} || $post->{from}{name}; 180 180 my $name_id = $post->{to}{data}[0]{id} || $post->{from}{id}; 181 my $post id = $post->{id};181 my $post_id = $post->{id}; 182 182 183 183 # Only handle post if it's new … … 186 186 my @keywords = keywords($post->{name} || $post->{message}); 187 187 my $topic = $keywords[0] || 'personal'; 188 $self->{topics}->{$post id} = $topic;188 $self->{topics}->{$post_id} = $topic; 189 189 # XXX indexing is fragile 190 190 my $msg = BarnOwl::Message->new( … … 196 196 direction => 'in', 197 197 body => $self->format_body($post), 198 post id => $postid,198 post_id => $post_id, 199 199 topic => $topic, 200 200 time => asctime(localtime $created_time), … … 206 206 BarnOwl::queue_message($msg); 207 207 } else { 208 $self->{topics}->{$post id} = $old_topics->{$postid} || 'personal';208 $self->{topics}->{$post_id} = $old_topics->{$post_id} || 'personal'; 209 209 } 210 210 … … 227 227 direction => 'in', 228 228 body => $comment->{message}, 229 post id => $postid,230 topic => $self->get_topic($post id),229 post_id => $post_id, 230 topic => $self->get_topic($post_id), 231 231 time => asctime(localtime $comment_time), 232 232 ); … … 279 279 my $self = shift; 280 280 281 my $post id = shift;281 my $post_id = shift; 282 282 my $msg = shift; 283 283 284 $self->{facebook}->add_comment( $post id )->set_message( $msg )->publish;284 $self->{facebook}->add_comment( $post_id )->set_message( $msg )->publish; 285 285 $self->sleep(0); 286 286 } … … 326 326 my $self = shift; 327 327 328 my $post id = shift;329 330 return $self->{topics}->{$post id} || 'personal';328 my $post_id = shift; 329 330 return $self->{topics}->{$post_id} || 'personal'; 331 331 } 332 332
Note: See TracChangeset
for help on using the changeset viewer.