feat: standardize timestamps to UTC
This commit is contained in:
@@ -465,9 +465,6 @@ describe("web auto-reply", () => {
|
||||
};
|
||||
|
||||
setLoadConfigMock(() => ({
|
||||
messages: {
|
||||
timestampPrefix: "UTC",
|
||||
},
|
||||
session: { store: store.storePath },
|
||||
}));
|
||||
|
||||
@@ -500,11 +497,11 @@ describe("web auto-reply", () => {
|
||||
const firstArgs = resolver.mock.calls[0][0];
|
||||
const secondArgs = resolver.mock.calls[1][0];
|
||||
expect(firstArgs.Body).toContain(
|
||||
"[WhatsApp +1 2025-01-01T01:00+01:00{Europe/Vienna}] [clawdbot] first",
|
||||
"[WhatsApp +1 2025-01-01T00:00Z] [clawdbot] first",
|
||||
);
|
||||
expect(firstArgs.Body).not.toContain("second");
|
||||
expect(secondArgs.Body).toContain(
|
||||
"[WhatsApp +1 2025-01-01T02:00+01:00{Europe/Vienna}] [clawdbot] second",
|
||||
"[WhatsApp +1 2025-01-01T01:00Z] [clawdbot] second",
|
||||
);
|
||||
expect(secondArgs.Body).not.toContain("first");
|
||||
|
||||
@@ -1350,7 +1347,6 @@ describe("web auto-reply", () => {
|
||||
messages: {
|
||||
messagePrefix: "[same-phone]",
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -1475,7 +1471,6 @@ describe("web auto-reply", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: "🦞",
|
||||
timestampPrefix: false,
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -1520,7 +1515,6 @@ describe("web auto-reply", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: "🦞",
|
||||
timestampPrefix: false,
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -1565,7 +1559,6 @@ describe("web auto-reply", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: "🦞",
|
||||
timestampPrefix: false,
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -1611,7 +1604,6 @@ describe("web auto-reply", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: "🦞",
|
||||
timestampPrefix: false,
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ vi.mock("../config/config.js", async (importOriginal) => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -16,7 +16,6 @@ const mockLoadConfig = vi.fn().mockReturnValue({
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -480,7 +479,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -536,7 +534,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -576,7 +573,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -592,7 +588,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -628,7 +623,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -643,7 +637,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -685,7 +678,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -720,7 +712,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -737,7 +728,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -773,7 +763,6 @@ describe("web monitor inbox", () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -840,7 +829,6 @@ it("defaults to self-only when no config is present", async () => {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ const DEFAULT_CONFIG = {
|
||||
messages: {
|
||||
messagePrefix: undefined,
|
||||
responsePrefix: undefined,
|
||||
timestampPrefix: false,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user