fixed mailtrap webhook event timestamp being parsed as milliseconds instead of seconds

This commit is contained in:
Mia Rose Winter 2024-04-17 17:00:25 +02:00
parent cc00bf5cb3
commit f84fd9e536
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -35,7 +35,7 @@ public record WebhookEvent(
int? ResponseCode) {
public WebhookEventType Type => Enum.Parse<WebhookEventType>(EventTypeString.Replace("_", ""), true);
public DateTimeOffset EventDateTime => DateTimeOffset.FromUnixTimeMilliseconds(Timestamp);
public DateTimeOffset EventDateTime => DateTimeOffset.FromUnixTimeSeconds(Timestamp);
}
public record Webhook {