fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-05-16 04:40 pm

[dw-free] identify deleted replies to journal

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

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

Present more information about deleted replies in the inbox, in the form of:

Deleted comment to post from x weeks/days/seconds ago in journal: comment by
poster in "subject of entry"

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/Event/JournalNewComment.pm
--------------------------------------------------------------------------------
diff -r bb1e29820f6f -r 7b5e08b1f2f2 cgi-bin/LJ/Event/JournalNewComment.pm
--- a/cgi-bin/LJ/Event/JournalNewComment.pm	Tue May 17 00:09:13 2011 +0800
+++ b/cgi-bin/LJ/Event/JournalNewComment.pm	Tue May 17 00:38:21 2011 +0800
@@ -253,20 +253,25 @@
     my $comment = $self->comment;
     my $journal = $self->u;
 
-    return sprintf("(Deleted comment in %s)", $journal->ljuser_display)
-        unless $comment && $comment->valid && !$comment->is_deleted;
-
     my $entry = $comment->entry;
     return sprintf("(Comment on a deleted entry in %s)", $journal->ljuser_display)
         unless $entry && $entry->valid;
 
+    my $entry_subject = $entry->subject_text || "an entry";
+    return sprintf(qq{(Deleted comment to post from %s in %s: comment by %s in "%s")},
+        LJ::diff_ago_text( $entry->logtime_unix ),
+        $journal->ljuser_display,
+        $comment->poster->ljuser_display,
+        $entry_subject
+    )
+        unless $comment && $comment->valid && !$comment->is_deleted;
+
     return "(You are not authorized to view this comment)" unless $comment->visible_to($target);
 
     my $ju = LJ::ljuser($journal);
     my $pu = LJ::ljuser($comment->poster);
     my $url = $comment->url;
 
-    my $entry_subject = $entry->subject_text || "an entry";
     my $in_text = '<a href="' . $entry->url . "\">$entry_subject</a>";
     my $subject = $comment->subject_text ? ' "' . $comment->subject_text . '"' : '';
 
--------------------------------------------------------------------------------
turlough: purple crocuses ((mcr) gerard approves)

[personal profile] turlough 2011-05-16 06:38 pm (UTC)(link)
Nice!!
marahmarie: (M In M Forever) (Default)

[personal profile] marahmarie 2011-05-17 02:19 am (UTC)(link)
Wish this live when for the first time (just a few days ago) someone deleted a comment from my journal. All I got in my Inbox was a line that said, "Deleted comment in [personal profile] marahmarie". I have my ideas who did it and why, but still.