We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c22dd4 commit 71007bbCopy full SHA for 71007bb
api/routes/update.ts
@@ -274,7 +274,13 @@ async function statelyUpdate(
274
// We want to group save search and search updates together
275
const actionKey = (u: ProfileUpdate) => (u.action === 'save_search' ? 'search' : u.action);
276
277
- const sortedUpdates = sortBy(updates, [actionKey]);
+ const sortedUpdates = sortBy(updates, [actionKey]).flatMap((u): ProfileUpdate[] => {
278
+ // Separate out tag_cleanup updates into individual updates
279
+ if (u.action === 'tag_cleanup') {
280
+ return u.payload.map((p) => ({ action: 'tag_cleanup', payload: [p] }));
281
+ }
282
+ return [u];
283
+ });
284
285
for (const updateChunk of chunk(sortedUpdates, 25)) {
286
await client.transaction(async (txn) => {
0 commit comments