madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r23197: LJSUP-14052: Web Notifications for LJ pr...

Committer: sbelyaev
LJSUP-14052: Web Notifications for LJ prototype [internal]
U   trunk/cgi-bin/LJ/Event.pm
Modified: trunk/cgi-bin/LJ/Event.pm
===================================================================
--- trunk/cgi-bin/LJ/Event.pm	2012-10-25 07:55:38 UTC (rev 23196)
+++ trunk/cgi-bin/LJ/Event.pm	2012-10-25 11:54:53 UTC (rev 23197)
@@ -411,32 +411,22 @@
     return $self->as_string($u);
 }
 
-# return a string representing an "Web Notification" subject (or another popup
-# notification type)
-# notification sent to the passed user notifying them that this event has
-# happened.
-#
-# this is a virtual function; base class function returns whatever "as_string"
-# method returns.
-#
-# $wlm->send($u, $event->as_web_subject($u));
-sub as_web_subject {
-    my ($self, $u) = @_;
-    return $self->as_email_subject($u);
-}
-
 # return a string representing an "Web Notification" body (or another popup
 # notification type)
 # notification sent to the passed user notifying them that this event has
 # happened.
 #
-# this is a virtual function; base class function returns whatever "as_string"
-# method returns.
+# this is a virtual function; base class function returns whatever default
+# structure method returns.
 #
 # $wlm->send($u, $event->as_web_body($u));
-sub as_web_body {
+sub as_web_notification {
     my ($self, $u) = @_;
-    return $self->as_string($u);
+    return { title   => $self->as_email_subject($u),
+             content => $self->as_string($u),
+             tag     => '',
+             icon    => '',
+             url     => '' };             
 }
 
 # return a string representing an email subject of an email notification sent

Tags: livejournal, 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