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

[ljcom] r11356: LJSUP-10501: Push-notifications (WP7, An...

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

M cgi-bin/LJ/Event/NewVGift.pm
M cgi-bin/LJ/Event/SupOfficialPost.pm
M cgi-bin/LJ/Event/UserPurging.pm
M bin/upgrading/en_LJ.dat
U   trunk/bin/upgrading/en_LJ.dat
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/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2012-01-26 14:04:37 UTC (rev 11355)
+++ trunk/bin/upgrading/en_LJ.dat	2012-01-26 14:26:01 UTC (rev 11356)
@@ -2535,10 +2535,32 @@
 esn.wishlist.updated_email_subject=Your friend updated his wishlist
 
 esn.push.notification.unsubscribe=You've been unsubscribed
-esn.push.notification.usermessagerecvd=New private message
-esn.push.notification.usermessagerecvd.title=LiveJournal
-esn.push.notification.usermessagerecvd.from=from [[user]]
+esn.push.notification.title=LiveJournal
 
+#esn.push.notification.usermessagerecvd=New private message
+esn.push.notification.usermessagerecvd=[[user]] sends me a message
+esn.push.notification.journalnewcomment=[[user]] comments on an entry in my journal
+esn.push.notification.communityentryreply=[[user]] replies to my entry in a [[community]]
+esn.push.notification.commentreply=[[user]] replies to my comment on an entry in [[journal]]
+esn.push.notification.supoffcialpost=There is a new announcement in [[community]]
+esn.push.notification.offcialpost=There is a new announcement in [[community]]
+esn.push.notification.pollvote=[[user]] votes in a poll you posted in [[journal]]
+esn.push.notification.befriended=[[user]] adds me as a friend
+esn.push.notification.defriended=[[user]] removes me from his Friends list
+esn.push.notification.wishlist=[[user]] has updated his wishlist
+esn.push.notification.invitedfriendjoins=A friend you invited creates a new journal [[journal]]
+esn.push.notification.communityjoinrequest=[[user]] requests membership in a community [[community]] you maintain
+esn.push.notification.newuserpic=[[user]] uploads a new userpic
+esn.push.notification.birthday=[[user]]'s birthday is on [[date]]
+esn.push.notification.newvgift=[[user]] receives a virtual gift 
+
+esn.push.notification.eventtrackjournalpostsentry=[[user]] posts a new entry 
+esn.push.notification.eventtrackjournalpostsentry.tagged=tagged [[tag]]
+esn.push.notification.eventtrackcommetsonentrytitle=[[user]] comments on "[[subject]]" in [[journal]] 
+esn.push.notification.eventtrackcommunitypostsentry=[[user]] posts a new entry to [[journal]] 
+esn.push.notification.eventtrackcommetstreadinentrytitle=[[user]] comments under the tread by [[poster]] in [[subject]] in [[journal]] 
+esn.push.notification.eventtrackusernamepurged=[[user]] has been purged 
+
 event.community.join_reject=A membership request has been rejected in [[community]]
 
 event.give=Someone sends me LJ Tokens

Modified: trunk/cgi-bin/LJ/Event/NewVGift.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/NewVGift.pm	2012-01-26 14:04:37 UTC (rev 11355)
+++ trunk/cgi-bin/LJ/Event/NewVGift.pm	2012-01-26 14:26:01 UTC (rev 11356)
@@ -194,4 +194,18 @@
 
 sub is_tracking { 0 }
 
+sub as_push {
+    my $self = shift;
+    my $u = shift;
+
+    return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.newvgift", 1, {
+        user        => $self->event_journal->user(),
+    })
+}
+
+sub as_push_payload {
+    my $self = shift;
+    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-01-26 14:04:37 UTC (rev 11355)
+++ trunk/cgi-bin/LJ/Event/SupOfficialPost.pm	2012-01-26 14:26:01 UTC (rev 11356)
@@ -32,4 +32,17 @@
 
 sub is_tracking { 0 }
 
+sub as_push {
+    my $self = shift;
+    my $u = shift;
+    return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.supoffcialpost", 1, {
+        community => $self->event_journal->user,
+    })
+}
+
+sub as_push_payload {
+    my $self = shift;
+    return '"t":2,"p":'.$self->arg1;
+}
+
 1;

Modified: trunk/cgi-bin/LJ/Event/UserPurging.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/UserPurging.pm	2012-01-26 14:04:37 UTC (rev 11355)
+++ trunk/cgi-bin/LJ/Event/UserPurging.pm	2012-01-26 14:26:01 UTC (rev 11356)
@@ -134,4 +134,16 @@
     return $self->as_email($u_to, 'html');
 }
 
+sub as_push {
+    my ($self, $u) = @_;
+    return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.eventtrackusernamepurged", 1, {
+        user => $self->u->user
+    })
+}
+
+sub as_push_payload {
+    my $self = shift;
+    return  '"t": 24, "j": "'.$self->u->user.'"';
+}
+
 1;

Tags: 2heoh, dat, ljcom, 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