Ask only the recurrence rules, the live server settles it
A probe against the live 0.16.19 says a one-off event comes back from an expanded query as id "eaaaaai" with baseEventId "i" — an instance id of its own, and a base that is a different event. The clause that treated a differing base as an occurrence of a series would therefore have gone on calling every event recurring, which was the bug. So recurrence rules alone decide it. What that gives up is an expanded instance that arrives without its rules attached; whether Stalwart does that is still to be checked against a real series.
This commit is contained in:
1 parent
8b22ea9aab
commit
330cecfb04
2 files changed
+10
-10
No files matched your search
@@ -15,9 +15,9 @@ describe("isRecurring", () => {
|
||||
it("does not call a one-off event a series just because it has a baseEventId", () => {
|
||||
expect(isRecurring(ev({ baseEventId: "ev1" }))).toBe(false);
|
||||
expect(isRecurring(ev({}))).toBe(false);
|
||||
});
|
||||
it("still recognises an occurrence whose base is another event", () => {
|
||||
expect(isRecurring(ev({ id: "ev1_2", baseEventId: "ev1" }))).toBe(true);
|
||||
// The shape a live 0.16.19 returns for a one-off: an instance id of its own,
|
||||
// and a base that is a different id. Neither makes it a series.
|
||||
expect(isRecurring(ev({ id: "eaaaaai", baseEventId: "i" }))).toBe(false);
|
||||
});
|
||||
it("recognises a series by its recurrence rules", () => {
|
||||
expect(isRecurring(ev({ recurrenceRules: [{ "@type": "RecurrenceRule", frequency: "weekly" }] }))).toBe(true);
|
||||
|
||||
Reference in new issue
Block a user