mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: registration + add captcha support (#227)
* fix: registration + update mobile version * feat: add captcha support for registration * fix: jid protocol address missing device * fix: linting errors
This commit is contained in:
@@ -3,6 +3,7 @@ import { GroupCipher, GroupSessionBuilder, SenderKeyDistributionMessage, SenderK
|
||||
import { SignalAuthState } from '../Types'
|
||||
import { SignalRepository } from '../Types/Signal'
|
||||
import { generateSignalPubKey } from '../Utils'
|
||||
import { jidDecode } from '../WABinary'
|
||||
|
||||
export function makeLibSignalRepository(auth: SignalAuthState): SignalRepository {
|
||||
const storage = signalStorage(auth)
|
||||
@@ -76,10 +77,9 @@ export function makeLibSignalRepository(auth: SignalAuthState): SignalRepository
|
||||
}
|
||||
}
|
||||
|
||||
const jidToSignalAddress = (jid: string) => jid.split('@')[0]
|
||||
|
||||
const jidToSignalProtocolAddress = (jid: string) => {
|
||||
return new libsignal.ProtocolAddress(jidToSignalAddress(jid), 0)
|
||||
const { user, device } = jidDecode(jid)!
|
||||
return new libsignal.ProtocolAddress(user, device || 0)
|
||||
}
|
||||
|
||||
const jidToSignalSenderKeyName = (group: string, user: string): string => {
|
||||
|
||||
Reference in New Issue
Block a user