* Which pairing a phone tool's code needs: sendSms pairs by SMS, sendWhatsapp on WhatsApp, * and a call takes either, so it goes by which saved code `code` is (WhatsApp by default).
(code: string | null | undefined, channel?: WhitelistChannel)
| 300 | * and a call takes either, so it goes by which saved code `code` is (WhatsApp by default). |
| 301 | */ |
| 302 | public pairingChannelFor(code: string | null | undefined, channel?: WhitelistChannel): PhoneChannel { |
| 303 | if (channel === 'sms' || channel === 'whatsapp') return channel; |
| 304 | return code && code === this.getPhoneCode('sms') ? 'sms' : 'whatsapp'; |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * The user's code for a phone tool (whatsapp when unspecified), generating one if needed. A call |
no test coverage detected