feat: add RejectCall to decline incoming calls - #200
Open
marketingstudio-it wants to merge 1 commit into
Open
Conversation
Exposes whatsmeow's Client.RejectCall so an incoming WhatsApp call can be declined/terminated from Python. Everything below the FFI boundary already supported it; only the binding + wrappers were missing. - goneonize/main.go: //export RejectCall (mirrors SetGroupName), calling whatsmeow (*Client).RejectCall(ctx, callFrom, callID). - neonize/_binder.py: declare the RejectCall FFI symbol (c-string return). - neonize/client.py: NewClient.reject_call(call_from, call_id). - neonize/aioze/client.py: async NewClient.reject_call(call_from, call_id). call_from is the caller's JID from the CallOffer event; it works for both a phone-number JID and a hosted @lid JID. Returns an empty string on success, otherwise the whatsmeow error text (same convention as set_group_name). Usage: @client.event(CallOffer) def on_call(client, call): client.reject_call(call.basicCallMeta.callCreator, call.basicCallMeta.callID)
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.
What
Exposes whatsmeow's
Client.RejectCallso an incoming call can be declined/terminated from Python (sync + async clients).Everything below the FFI boundary already supported this — only the binding and the Python wrappers were missing.
Changes
goneonize/main.go://export RejectCall(mirrorsSetGroupName), calling whatsmeow(*Client).RejectCall(ctx, callFrom, callID).neonize/_binder.py: declare theRejectCallFFI symbol (c-string return).neonize/client.py:NewClient.reject_call(call_from, call_id).neonize/aioze/client.py: asyncNewAClient.reject_call(call_from, call_id).call_fromis the caller's JID from theCallOfferevent; works for both a phone-number JID and a hosted@lidJID. Returns