[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
fu.
Files modified:
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]](https://www.dreamwidth.org/img/silk/identity/user.png)
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 --------------------------------------------------------------------------------
no subject
no subject