Skip to content

fix: centralize WhatsApp account fetch with decryption#184

Merged
shridarpatil merged 2 commits intomainfrom
fix/centralize-account-decrypt
Feb 20, 2026
Merged

fix: centralize WhatsApp account fetch with decryption#184
shridarpatil merged 2 commits intomainfrom
fix/centralize-account-decrypt

Conversation

@shridarpatil
Copy link
Owner

Replace all inline DB queries for WhatsApp accounts with resolveWhatsAppAccount which handles both lookup and decryption.

Previously, most code paths fetched accounts from the database but never called decryptAccountSecrets, causing "Cannot parse access token" errors when encryption is enabled.

Also fixes org-scoping in SLA processor queries that previously had no organization_id filter.

@shridarpatil shridarpatil force-pushed the fix/centralize-account-decrypt branch 3 times, most recently from 1b6f263 to e739fda Compare February 20, 2026 15:37
Replace all inline DB queries for WhatsApp accounts with
resolveWhatsAppAccount which handles both lookup and decryption.

Previously, most code paths fetched accounts from the database
but never called decryptAccountSecrets, causing "Cannot parse
access token" errors when encryption is enabled.

Also fixes org-scoping in SLA processor queries that previously
had no organization_id filter.
@shridarpatil shridarpatil force-pushed the fix/centralize-account-decrypt branch from e739fda to 1ad4179 Compare February 20, 2026 16:11
@shridarpatil shridarpatil merged commit d285485 into main Feb 20, 2026
8 checks passed
@shridarpatil shridarpatil deleted the fix/centralize-account-decrypt branch February 20, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant