fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-04-01 07:31 am

[dw-free] "filter to this entry" should include comment edit notifications

[commit: http://hg.dwscoalition.org/dw-free/rev/7a87e8cad75d]

http://bugs.dwscoalition.org/show_bug.cgi?id=3583

Look up the list of events which should be included, instead of hardcoding.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/NotificationInbox.pm
--------------------------------------------------------------------------------
diff -r 08ca14543825 -r 7a87e8cad75d cgi-bin/LJ/NotificationInbox.pm
--- a/cgi-bin/LJ/NotificationInbox.pm	Fri Apr 01 15:13:37 2011 +0800
+++ b/cgi-bin/LJ/NotificationInbox.pm	Fri Apr 01 15:30:58 2011 +0800
@@ -178,8 +178,9 @@ sub subset_items {
 
 sub singleentry_items {
     my ( $self, $itemid ) = @_;
+    my %related_events = map { $_ => 1 } LJ::Event::JournalNewComment->related_events;
     return grep {
-        ( $_->event->class eq "LJ::Event::JournalNewComment" || $_->event->class eq "LJ::Event::JournalNewComment::TopLevel" )
+        $related_events{$_->event->etypeid}
         && $_->event->comment
         && $_->event->comment->entry    # may have been deleted, which breaks all filter to entry comments
         && $_->event->comment->entry->ditemid == $itemid
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org