Firestore cloud function to recursively update subcollection/collectionGroup
问题 I have this cloud function: import pLimit from "p-limit"; const syncNotificationsAvatar = async ( userId: string, change: Change<DocumentSnapshot> ) => { if (!change.before.get("published") || !change.after.exists) { return; } const before: Profile = change.before.data() as any; const after: Profile = change.after.data() as any; const keysToCompare: (keyof Profile)[] = ["avatar"]; if ( arraysEqual( keysToCompare.map((k) => before[k]), keysToCompare.map((k) => after[k]) ) ) { return; } const