Update go mesage#277
Merged
Merged
Conversation
|
Visit the preview URL for this PR (updated for commit d796873):
(expires Thu, 09 Jul 2026 16:11:15 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0c15c45ea5a4c54095387eacf30c3755c9260f22 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the WhatsApp “GO” messaging logic to include a special-case message when no tracks have marked themselves ready, and adds a unit test to cover that scenario.
Changes:
- Add a dedicated
readyCount === 0branch ingoMessage()with a new “nobody is ready” GO message. - Add a
sendGoMessagetest that asserts the new message contains0/3and a recognizable phrase.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| functions/src/api/routes/whatsapp/trackSession.ts | Adds a new GO-message branch for the “0 tracks ready” case. |
| functions/src/api/routes/whatsapp/trackFlow.test.ts | Adds test coverage for the new “0 tracks ready” GO message. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+39
to
+41
| if (readyCount === 0) { | ||
| return `🟢 GO — 0/${tracks.length} tracks prêts. Le sondage ? Personne ne l'a vu. On y va quand même, c'est la magie du live 🦩` | ||
| } |
Comment on lines
+107
to
+109
| expect(sendMessage).toHaveBeenCalledWith('c@c.us', expect.stringContaining('0/3')) | ||
| expect(sendMessage).toHaveBeenCalledWith('c@c.us', expect.stringContaining('magie du live')) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.