Skip to content

Conversation

@tovmeod
Copy link

@tovmeod tovmeod commented Nov 16, 2025

This commit enhances the PairPhone implementation to properly return the pairing code from the Go layer to Python, enabling a direct pairing workflow without requiring external tools.

Changes:

  • Added PairPhoneReturnFunction protobuf message with Code and Error fields
  • Created dedicated //export PairPhone CGO function that calls whatsmeow.PairPhone
  • Added PairPhoneError exception class for error handling
  • Added Python ctypes bindings for the new PairPhone CGO function
  • Updated client.py PairPhone method to call CGO function and return pair code
  • Updated aioze/client.py async PairPhone method with same functionality
  • Regenerated protobuf Python bindings

The PairPhone method now follows the established pattern used by other CGO functions like ResolveContactQRLink for consistent error handling and return value management.

This commit enhances the PairPhone implementation to properly return
the pairing code from the Go layer to Python, enabling a direct
pairing workflow without requiring external tools.

Changes:
- Added PairPhoneReturnFunction protobuf message with Code and Error fields
- Created dedicated //export PairPhone CGO function that calls whatsmeow.PairPhone
- Added PairPhoneError exception class for error handling
- Added Python ctypes bindings for the new PairPhone CGO function
- Updated client.py PairPhone method to call CGO function and return pair code
- Updated aioze/client.py async PairPhone method with same functionality
- Regenerated protobuf Python bindings

The PairPhone method now follows the established pattern used by other
CGO functions like ResolveContactQRLink for consistent error handling
and return value management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant