Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include channel in flow start #608

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion eventstore/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,10 @@ def process_whatsapp_template_send_status():
all_statuses = ready_statuses | expired_statuses

for status in all_statuses:
extra = status.data
extra["preferred_channel"] = status.preferred_channel
async_create_flow_start.delay(
extra=status.data,
extra=extra,
flow=str(status.flow_uuid),
contacts=[str(status.contact_uuid)],
)
4 changes: 2 additions & 2 deletions eventstore/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,12 +987,12 @@ def test_starts_flows(self, mock_async_flow_start):
mock_async_flow_start.delay.mock_calls,
[
mock.call(
extra=self.status_ready.data,
extra={"status": "ready", "preferred_channel": "WhatsApp"},
flow=self.status_ready.flow_uuid,
contacts=[self.status_ready.contact_uuid],
),
mock.call(
extra=self.status_expired.data,
extra={"status": "expired", "preferred_channel": "WhatsApp"},
flow=self.status_expired.flow_uuid,
contacts=[self.status_expired.contact_uuid],
),
Expand Down
Loading