A third party ATProto appview
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

backfill cap for follows

+24 -2
+24 -2
server/services/auto-backfill-follows.ts
··· 673 673 service: pdsService.serviceEndpoint, 674 674 }); 675 675 676 - // Fetch their posts 676 + // Fetch their posts (limit to 100 posts per user) 677 677 let postsFetched = 0; 678 678 let cursor: string | undefined; 679 + const MAX_POSTS_PER_USER = 100; 679 680 680 681 do { 681 682 try { ··· 688 689 689 690 // Process each post 690 691 for (const record of response.data.records) { 692 + // Stop if we've reached the limit for this user 693 + if (postsFetched >= MAX_POSTS_PER_USER) { 694 + break; 695 + } 696 + 691 697 try { 692 698 const createdAt = 693 699 record.value?.createdAt || new Date().toISOString(); ··· 717 723 ); 718 724 } 719 725 } 726 + } 727 + 728 + // Stop pagination if we've hit the limit 729 + if (postsFetched >= MAX_POSTS_PER_USER) { 730 + break; 720 731 } 721 732 722 733 cursor = response.data.cursor; ··· 794 805 service: pdsService.serviceEndpoint, 795 806 }); 796 807 797 - // Fetch their posts 808 + // Fetch their posts (limit to 100 posts) 798 809 let postsFetched = 0; 799 810 let cursor: string | undefined; 811 + const MAX_POSTS_PER_USER = 100; 800 812 801 813 do { 802 814 try { ··· 809 821 810 822 // Process each post 811 823 for (const record of response.data.records) { 824 + // Stop if we've reached the limit 825 + if (postsFetched >= MAX_POSTS_PER_USER) { 826 + break; 827 + } 828 + 812 829 try { 813 830 const createdAt = 814 831 record.value?.createdAt || new Date().toISOString(); ··· 837 854 ); 838 855 } 839 856 } 857 + } 858 + 859 + // Stop pagination if we've hit the limit 860 + if (postsFetched >= MAX_POSTS_PER_USER) { 861 + break; 840 862 } 841 863 842 864 cursor = response.data.cursor;