madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[ljcom] r11608: LJSUP-11468: Push notifications Livejour...

Committer: sbelyaev
LJSUP-11468: Push notifications Livejournal server-side code refactoring
U   trunk/cgi-bin/LJ/Event/NewVGift.pm
U   trunk/cgi-bin/LJ/Event/SupOfficialPost.pm
U   trunk/cgi-bin/LJ/Event/UserPurging.pm
Modified: trunk/cgi-bin/LJ/Event/NewVGift.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/NewVGift.pm	2012-03-20 12:30:27 UTC (rev 11607)
+++ trunk/cgi-bin/LJ/Event/NewVGift.pm	2012-03-20 13:50:28 UTC (rev 11608)
@@ -205,7 +205,10 @@
 
 sub as_push_payload {
     my $self = shift;
-    return '"t":18,"u":"'.$self->event_journal->user().'","g":"'.$self->arg1().'"';
+    return { 't' => 18,
+             'u' => $self->event_journal->user(),
+             'g' => $self->arg1(),
+           };
 }
 
 1;

Modified: trunk/cgi-bin/LJ/Event/SupOfficialPost.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/SupOfficialPost.pm	2012-03-20 12:30:27 UTC (rev 11607)
+++ trunk/cgi-bin/LJ/Event/SupOfficialPost.pm	2012-03-20 13:50:28 UTC (rev 11608)
@@ -42,7 +42,9 @@
 
 sub as_push_payload {
     my $self = shift;
-    return '"t":2,"p":'.$self->arg1;
+    return { 't' => 2,
+             'p' => $self->arg1,
+           };
 }
 
 1;

Modified: trunk/cgi-bin/LJ/Event/UserPurging.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/UserPurging.pm	2012-03-20 12:30:27 UTC (rev 11607)
+++ trunk/cgi-bin/LJ/Event/UserPurging.pm	2012-03-20 13:50:28 UTC (rev 11608)
@@ -143,7 +143,10 @@
 
 sub as_push_payload {
     my $self = shift;
-    return  '"t": 24, "j": "'.$self->u->user.'"';
+    
+    return { 't' => 24,
+             'j' => $self->u->user,
+           };
 }
 
 1;

Tags: ljcom, madeon, pm, sbelyaev
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