MCPcopy Create free account
hub / github.com/Roy3838/Observer / pairingChannelFor

Method pairingChannelFor

app/src/utils/settings.ts:302–305  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 2

PhoneSetupFunction · 0.80
WhitelistInlineFunction · 0.80

Calls 1

getPhoneCodeMethod · 0.95

Tested by

no test coverage detected