Skip to content

feat(channel): add support for @newsletter in sendMessage and findChannels#2

Merged
unwarkz merged 3 commits intomainfrom
copilot/feat-channel-add-support-newsletter
Mar 13, 2026
Merged

feat(channel): add support for @newsletter in sendMessage and findChannels#2
unwarkz merged 3 commits intomainfrom
copilot/feat-channel-add-support-newsletter

Conversation

Copy link

Copilot AI commented Mar 13, 2026

📋 Description

Ports upstream commit 52fa931 from EvolutionAPI/evolution-api develop branch. Adds newsletter JID (@newsletter) support across the messaging pipeline.

Changes

  • src/utils/createJid.ts@newsletter added to early-return guard; newsletter JIDs now pass through unmodified instead of being treated as phone numbers
  • src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts
    • whatsappNumber(): newsletter JIDs short-circuit forEach, returned as OnWhatsAppDto(jid, true, number, undefined, 'newsletter') — skips group/user validation
    • prepareMessage(): outgoing newsletter messages (fromMe && isJidNewsletter) get status forced to DELIVERED (index 3), matching channel delivery semantics
    • fetchChannels(): new method — queries messages for newsletter JIDs, deduplicates by remoteJid, returns paginated { total, pages, currentPage, limit, records }
  • src/api/controllers/chat.controller.tsfetchChannels() delegating to instance
  • src/api/routes/chat.router.tsPOST /findChannels route wired to chatController.fetchChannels
  • .github/workflows/build_ghcr_image.yml — added push trigger on main and this branch so GHCR image at ghcr.io/unwarkz/evolution-api:latest builds automatically on merge

🔗 Related Issue

🧪 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧹 Code cleanup
  • 🔒 Security fix

🧪 Testing

  • Manual testing completed
  • Functionality verified in development environment
  • No breaking changes introduced
  • Tested with different connection types (if applicable)

📸 Screenshots (if applicable)

✅ Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have manually tested my changes thoroughly
  • I have verified the changes work with different scenarios
  • Any dependent changes have been merged and published

📝 Additional Notes

GHCR image build: A workflow run was triggered on push but requires owner approval (Copilot bot trigger). To get ghcr.io/unwarkz/evolution-api:latest built with these changes:

  1. Approve the pending run at Actions #23048100621, or
  2. Merge to main — the updated workflow will build automatically on push

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/evolution-api/evolution-api/node_modules/prisma/build/child {"product":"prisma","version":"6.19.0","cli_install_type":"local","information":"","local_timestamp":"2026-03-13T11:05:36Z","project_hash":"207058b3","cli_path":"/home/REDACTED/work/evolution-api/evolution-api/node_modules/.bin/prisma","cli_path_hash":"1a1f git conf�� get --local modules/@npmcli/run-script/lib/node-gyp-bin/git pull.rebase (dns block)
  • scarf.sh
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./report.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 13, 2026 11:06
…nnels

Co-authored-by: unwarkz <14983645+unwarkz@users.noreply.github.com>
Co-authored-by: unwarkz <14983645+unwarkz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for @newsletter in sendMessage and findChannels feat(channel): add support for @newsletter in sendMessage and findChannels Mar 13, 2026
Copilot AI requested a review from unwarkz March 13, 2026 11:11
@unwarkz unwarkz marked this pull request as ready for review March 13, 2026 11:29
@unwarkz unwarkz merged commit 5843ba8 into main Mar 13, 2026
1 check passed
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.

2 participants