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

[livejournal] r20358: LJSUP-9803: Push-notifications (WP7)

Committer: slobin
LJSUP-9803: Push-notifications (WP7)

M UserMessageRecvd.pm
U   trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm
Modified: trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm	2011-10-18 11:11:31 UTC (rev 20357)
+++ trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm	2011-10-18 11:13:09 UTC (rev 20358)
@@ -190,12 +190,28 @@
     my $u = shift;
     my %args = @_;
 
-    my $message = LJ::Lang::get_text($u->prop('browselang'), 'esn.push.notification.usermessagerecvd');
+    my $message ;
+    if($args{from}) {
+        $message = LJ::Lang::get_text($u->prop('browselang'), 'esn.push.notification.usermessagerecvd.from', 1, { user => $u->{user}});
+    } else {
+        $message = LJ::Lang::get_text($u->prop('browselang'), 'esn.push.notification.usermessagerecvd');
+    }
 
     return $message;
 }
 
+sub as_push_title {
+    my $self = shift;
+    my $u = shift;
+    my %args = @_;
 
+    my $message = LJ::Lang::get_text($u->prop('browselang'), 'esn.push.notification.usermessagerecvd.title');
+
+    return $message;
+}
+
+
+
 sub subscription_as_html {
     my ($class, $subscr) = @_;
     my $journal = $subscr->journal or croak "No user";

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