2heoh (2heoh) wrote in changelog,
2heoh
2heoh
changelog

[livejournal] r21015: LJSUP-10501: Push-notifications (WP7, An...

Committer: slobin
LJSUP-10501: Push-notifications (WP7, Android, iOS)
warnings deleted

M JournalNewComment.pm
U   trunk/cgi-bin/LJ/Event/JournalNewComment.pm
Modified: trunk/cgi-bin/LJ/Event/JournalNewComment.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/JournalNewComment.pm	2012-01-26 14:24:36 UTC (rev 21014)
+++ trunk/cgi-bin/LJ/Event/JournalNewComment.pm	2012-01-26 14:58:24 UTC (rev 21015)
@@ -901,7 +901,6 @@
         if($self->event_journal->journaltype eq 'C') {
 
             if($self->comment->parent) {
-warn 01;
                 return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.eventtrackcommetstreadinentrytitle", 1, {
                     user    => $self->comment->poster->user,
                     subject => $subject, 
@@ -910,7 +909,6 @@
                 });
 
             } else {
-warn 11;
                 return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.eventtrackcommetsonentrytitle", 1, {
                     user    => $self->comment->poster->user,
                     subject => $subject,
@@ -918,7 +916,6 @@
                 });
             }
         } else {
-warn 2;
                 return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.eventtrackcommetsonentrytitle", 1, {
                 user    => $self->comment->poster->user,
                 subject => $subject,
@@ -929,21 +926,18 @@
     } else {
 
         if($parent && LJ::u_equals($parent->poster, $u)) {
-warn 3;
             return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.commentreply", 1, {
                 user    => $self->comment->poster->user,
                 journal => $self->event_journal->user,
             });
 
         } elsif($self->event_journal->journaltype eq 'C') {
-warn 4;
             return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.communityentryreply", 1, {
                 user        => $self->comment->poster->user,
                 community   => $self->event_journal->user,
             })
 
         } else {
-warn 5;
             return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.journalnewcomment", 1, {
                 user => $self->comment->poster->user,
             })
@@ -966,31 +960,18 @@
             if($parent) {
                 return '"t":26, "j":"'.$self->event_journal->user.'",'.
                     '"p":'.$entry->ditemid.', "r":'.$self->comment->parent->dtalkid.', "c":'.$self->comment->dtalkid
-            } else {
-                return '"t":25,"j":"'.$self->event_journal->user.'","p":'.$entry->ditemid.',"c":'.$self->comment->dtalkid;
-            }
-
         } else {
-            return '"t": "eventEntryCommunityReply","j":"'.$self->event_journal->user .'","p":'.$entry->ditemid.'","c":'.$self->comment->dtalkid
+            return '"t":25,"j":"'.$self->event_journal->user.'","p":'.$entry->ditemid.',"c":'.$self->comment->dtalkid;
         }
+
     } else {
         if($parent && LJ::u_equals($parent->poster, $u)) {
-            return  '"t":5,"j":"'.$self->event_journal->user.'","p":'.$entry->ditemid .',"c":'.$self->comment->dtalkid;
+            return '"t":5,"j":"'.$self->event_journal->user.'","p":'.$entry->ditemid.',"c":'.$self->comment->dtalkid;
         } elsif($self->event_journal->journaltype eq 'C') {
-warn 2;
-            return '"type": "eventEntryCommunityReply", '
-            . '"journalName": "'.$self->event_journal->user .'", '
-            . '"postid": "'.$entry->ditemid.'", '
-            . '"commentid": '.$self->comment->dtalkid;
-
+            return '"t":4,"j":"'.$self->event_journal->user.'","p":'.$entry->ditemid.',"c":'.$self->comment->dtalkid;
         } else {
-warn 3;
-            return "\"type\": \"eventEntryReply\", "
-            . "\"journalName\": \"".$self->event_journal->user."\" " 
-            . "\"postid\": ".$entry->ditemid.", "
-            . "\"commentid\": ".$self->comment->dtalkid; 
+            return '"t":3,"j":"'.$self->event_journal->user.'","p":'.$entry->ditemid.',"c":'.$self->comment->dtalkid; 
         }
-
     }
 }  
 

Tags: 2heoh, livejournal, pm, slobin
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