feat(signal): add device-linking QR flow for Signal channels#358
Merged
Conversation
Signal had no way to link a device — the connect UI was hardcoded for WhatsApp and the /qr endpoints served the WhatsApp (Baileys) QR. The Signal bridge only ever checked registration and threw "Phone number not registered", so users could never get a linking QR. Now Signal reuses the same one-click QR pairing UX as WhatsApp: - signal.js: start() enters linking mode instead of throwing when the account isn't registered. Adds fetchLinkQR() (proxies signal-cli /v1/qrcodelink as a PNG data URL), beginLinking(), watchForLink() (polls /v1/accounts until the device links, then starts the receive loop), and relink(). status getter now exposes status/hasQR/phoneNumber. - connector/index.js: adds /signal/qr, /signal/connect, /signal/logout; /signal/health returns full status; /signal/configure no longer 500s when unlinked and no longer requires a phone number up front. - channels_controller: connect/qr/health/logout proxies are now channel-type aware and route Signal to /signal/* on the connector. Phone number is no longer required to configure Signal. - connect.html.erb + qr_pair_controller.js: platform-aware copy and "Linked as" label (Signal vs WhatsApp); falls back to phone number. - _form.html.erb: Signal setup now points users at the QR Connect flow; phone number marked optional (auto-detected after linking). Fixes the "no way to get a QR code for linking Signal" report.
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.
Adds a Signal device-linking QR flow so users can link Signal the same one-click way as WhatsApp. Previously the connect UI was hardcoded for WhatsApp and the Signal bridge never generated a QR (it just threw 'Phone number not registered'), so there was no way to link a device.
Changes:
Fixes the 'no way to get a QR code for linking Signal' report.