Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r9452: LJSUP-6700 (We should post first picture...

Committer: ailyin
LJSUP-6700 (We should post first picture of the post instead of userpic or banners)
U   trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm
U   trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm
Modified: trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm
===================================================================
--- trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm	2010-09-01 05:48:44 UTC (rev 9451)
+++ trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm	2010-09-01 07:05:16 UTC (rev 9452)
@@ -40,12 +40,7 @@
     my $body_raw = $comment->body_raw;
 
     my $picture = $class->extract_first_picture_url($body_raw);
-    if (!$picture) {
-        if (my $upi = $comment->userpic) {
-            $picture = $upi->url;
-        }
-    }
-    $data->{'picture'} = $picture if $picture;
+    $data->{'picture'} = $picture || '';
 
     my $title = $class->cleanup($comment->subject_raw);
     my $body  = $class->cleanup($body_raw);

Modified: trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm
===================================================================
--- trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm	2010-09-01 05:48:44 UTC (rev 9451)
+++ trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm	2010-09-01 07:05:16 UTC (rev 9452)
@@ -40,12 +40,7 @@
     my $event_raw = $entry->event_raw;
 
     my $picture = $class->extract_first_picture_url($event_raw);
-    if (!$picture) {
-        if (my $upi = $entry->userpic) {
-            $picture = $upi->url;
-        }
-    }
-    $data->{'picture'} = $picture if $picture;
+    $data->{'picture'} = $picture || '';
 
     my $title = $class->cleanup($entry->subject_raw);
     my $event = $class->cleanup($event_raw);

Tags: andy, ljcom, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments