Conversation
Add WhatsApp as a second messaging channel via the whatsapp-rust crate, gated behind the `whatsapp` cargo feature (enabled by default). New crate `moltis-whatsapp` with: - QR code pairing through WhatsApp Linked Devices - Sled-backed persistent Signal Protocol store (survives restarts) - Inbound text, media (image/voice/video/document/location) handling - Outbound text replies with typing indicators - DM and group access control (Open/Allowlist/Disabled) with OTP flow - Self-chat support with watermark-based loop prevention Multi-channel architecture refactor: - LiveChannelService now supports concrete plugin fields behind feature flags - MultiChannelOutbound routes outbound messages by account type - ChannelPlugin trait extended for WhatsApp lifecycle Gateway integration: - Channel REST/RPC routes for WhatsApp config and pairing - Real-time pairing events over WebSocket - Chat routing for WhatsApp inbound messages - Web UI: channel type picker, QR code modal, WhatsApp card/edit views Documentation and changelog updated.
Resolve conflicts: keep WhatsApp changelog entries in [Unreleased] above the 0.3.8 release from main. Regenerate Cargo.lock.
Contributor
Merging this PR will degrade performance by 11.82%
Performance Changes
Comparing Footnotes
|
Resolve conflicts: - CHANGELOG: move WhatsApp entries to [Unreleased] above 0.4.1/0.4.0 - chat.rs: keep Whatsapp in match arm + main's logbook_html/send_text_with_suffix - style.css: rebuild Tailwind from main's base - Cargo.lock: regenerate with whatsapp deps on top of main
Resolve conflicts: - CHANGELOG: WhatsApp entries in [Unreleased] above 0.5.0/0.4.1/0.4.0 - plugin.rs: keep both WhatsApp tests and new DummyOutbound/send_location test - page-channels.js: merge comment line (CSS mask-image + inline SVG) - channel.rs: take main's if-let guard instead of unwrap - chat.rs: separate Telegram arm (main's caption/transcript logic) from WhatsApp arm (simpler send_media/send_text with logbook) - style.css: rebuild Tailwind from main's base
…ecovery Adapt to workspace-level clippy::unwrap_used and clippy::expect_used deny lints added in v0.5.0. Replace all 20 .unwrap() calls on RwLock/Mutex guards with .unwrap_or_else(|e| e.into_inner()) to gracefully recover from poisoned locks, matching the telegram crate pattern.
Resolve CHANGELOG conflict: combine WhatsApp and hooks/CSP entries in [Unreleased].
Resolve conflicts: - page-channels.js: adopt exported function pattern from main, keep WhatsApp-specific state resets (showAddWhatsAppModal, showChannelPicker) - style.css: rebuild Tailwind from main's base
# Conflicts: # CHANGELOG.md
# Conflicts: # scripts/local-validate.sh
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
# Conflicts: # Cargo.toml # crates/gateway/Cargo.toml # crates/gateway/src/assets/style.css # scripts/local-validate.sh
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.
Summary
whatsapp-rust, gated behind thewhatsappcargo feature (enabled by default)moltis-whatsappcrate: QR code pairing, sled-backed Signal Protocol persistence, inbound media handling (image/voice/video/document/location), access control (DM/group policies + OTP), self-chat with loop preventionLiveChannelServicewith concrete plugin fields behind feature flags,MultiChannelOutboundfor routing by account typedocs/src/whatsapp.mdValidation
Completed
cargo +nightly fmt --all -- --checkcargo +nightly clippy --workspace --all-targetscargo +nightly checkcargo +nightly test -p moltis-whatsapp(63 tests)cargo +nightly test -p moltis-channels -p moltis-config -p moltis-gateway(337 tests)biome ci crates/gateway/src/assets/js/page-channels.jsRemaining
./scripts/local-validate.shwith PR numberManual QA
Tested compilation, formatting, linting, and full test suite. End-to-end WhatsApp pairing and message flow require a physical device.