fix: update GetRepliesWithFilledText to join Posts table and filter NotFound

This commit is contained in:
jim
2026-05-06 09:50:36 -05:00
parent 1507086269
commit 0adaef62b1
2 changed files with 4013 additions and 7 deletions
+8 -7
View File
@@ -868,13 +868,14 @@ namespace URLNotesGrabberCORE
{
connection.Open();
string sql = @"SELECT DISTINCT Notes.RootBlogName as blogName, Notes.PostID,
MAX(Notes.timestamp) as LatestTimestamp
FROM Notes
WHERE Notes.type = 'reply'
AND (Notes.replyText IS NULL OR Notes.replyText = '' OR Notes.replyText = '.')
GROUP BY Notes.RootBlogName, Notes.PostID
ORDER BY LatestTimestamp ASC";
string sql = @"SELECT DISTINCT P.BlogName, P.PostID, MAX(N.timestamp) as LatestTimestamp
FROM Posts P
INNER JOIN Notes N ON N.PostID = P.PostID AND N.RootBlogName = P.BlogName
WHERE P.NotFound = 0
AND N.type = 'reply'
AND (N.replyText IS NULL OR N.replyText = '' OR N.replyText = '.')
GROUP BY P.BlogName, P.PostID
ORDER BY LatestTimestamp ASC";
if (limit.HasValue)
{