New and generic scrape algorithm #11

Merged
SoXX merged 20 commits from dev/algorithm into main 2024-11-01 21:39:21 +00:00
Showing only changes of commit 282e769c13 - Show all commits

View File

@ -81,7 +81,7 @@ func BatchPostProcessingWithSummery(ctx context.Context, userSource models.UserS
anthroveFaves := make([]models.UserFavorite, 0, len(existingPostsReferences)) anthroveFaves := make([]models.UserFavorite, 0, len(existingPostsReferences))
newPosts := make([]models.Post, 0, len(existingPostsReferences)) newPosts := make([]models.Post, 0, len(existingPostsReferences))
for i, post := range posts { for _, post := range posts {
if !slices.ContainsFunc(existingPostsReferences, func(reference models.PostReference) bool { if !slices.ContainsFunc(existingPostsReferences, func(reference models.PostReference) bool {
found := reference.SourcePostID == post.References[0].SourcePostID found := reference.SourcePostID == post.References[0].SourcePostID
if found { if found {