[READ-ONLY] Mirror of https://github.com/flo-bit/contrail. atproto backend in a bottle flo-bit.dev/contrail/
0

Configure Feed

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

fix lex

Florian (Mar 17, 2026, 8:21 PM +0100) b1f30015 93ada33b

+7 -7
+1 -1
scripts/generate-lexicons.ts
··· 243 243 items: { type: "ref", ref: `#${recordDefName}` }, 244 244 }; 245 245 } 246 - groupProperties["_other"] = { 246 + groupProperties["other"] = { 247 247 type: "array", 248 248 items: { type: "ref", ref: `#${recordDefName}` }, 249 249 };
+3 -3
tests/hydrate.test.ts
··· 155 155 expect(result[eventUri].rsvps["going"]).toHaveLength(1); 156 156 }); 157 157 158 - it("groups into '_other' when groupBy value is null", async () => { 158 + it("groups into 'other' when groupBy value is null", async () => { 159 159 const eventUri = "at://did:plc:test/community.lexicon.calendar.event/evt1"; 160 160 161 161 await applyEvents(db, [makeEvent({ uri: eventUri, rkey: "evt1", time_us: 1000 })]); 162 162 163 - // Insert RSVP without a status field — groupBy "status" should fall back to "_other" 163 + // Insert RSVP without a status field — groupBy "status" should fall back to "other" 164 164 await applyEvents(db, [ 165 165 makeEvent({ 166 166 uri: "at://did:plc:user1/community.lexicon.calendar.rsvp/r1", ··· 181 181 const result = await resolveHydrates(db, relations, { rsvps: 10 }, [eventRow!]); 182 182 183 183 expect(result[eventUri].rsvps).toBeDefined(); 184 - expect(result[eventUri].rsvps["_other"]).toHaveLength(1); 184 + expect(result[eventUri].rsvps["other"]).toHaveLength(1); 185 185 }); 186 186 });
+1 -1
src/core/router/hydrate.ts
··· 70 70 : [matchedValue]; 71 71 72 72 const groupValue = rel.groupBy 73 - ? String(getNestedValue(record, rel.groupBy) ?? "_other") 73 + ? String(getNestedValue(record, rel.groupBy) ?? "other") 74 74 : "_flat"; 75 75 76 76 for (const parentUri of parentUris) {
+1 -1
lexicons-generated/community/lexicon/calendar/event/getRecord.json
··· 157 157 "ref": "#hydrateRsvpsRecord" 158 158 } 159 159 }, 160 - "_other": { 160 + "other": { 161 161 "type": "array", 162 162 "items": { 163 163 "type": "ref",
+1 -1
lexicons-generated/community/lexicon/calendar/event/listRecords.json
··· 262 262 "ref": "#hydrateRsvpsRecord" 263 263 } 264 264 }, 265 - "_other": { 265 + "other": { 266 266 "type": "array", 267 267 "items": { 268 268 "type": "ref",