feat: send Discord notifications for waitlist and new Google signups#3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54d81a7394
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| def build_waitlist_signup_payload(entry: WaitlistEntry) -> dict: | ||
| timestamp = int(entry.created_at.astimezone(UTC).timestamp()) |
There was a problem hiding this comment.
Treat naive created_at as UTC before converting timestamp
entry.created_at.astimezone(UTC) produces incorrect epoch values when created_at is naive (common with SQLite and some DB/driver timezone settings), because Python assumes the host local timezone for naive datetimes. In non-UTC deployments this shifts the displayed Discord "Signed Up" time by the server offset, so notifications show wrong signup times even though the stored value represents UTC.
Useful? React with 👍 / 👎.
Summary
Details
DISCORD_WAITLIST_WEBHOOK_URLfor waitlist notificationsDISCORD_NEW_USER_WEBHOOK_URLfor first-time Google signup notifications.env.exampleandREADME.mdTesting
python3 -m pytest -q