jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

Wrong argument in disconnect handler for Connection #82

Closed cameronhatfield closed 6 years ago

cameronhatfield commented 6 years ago
TwilioPlugin.Connection.prototype.disconnect = function(fn) {
        if (typeof(argument) == 'function') {
            delegate['onconnectiondisconnect'] = argument;
        } else {
            Cordova.exec(null,null,"TCPlugin","disconnectConnection",[]);
        }
}

fn should be argument / or argument should be fn.

jefflinwood commented 6 years ago

Hi,

Let me take a look at that, but I'm pretty sure you are correct from reading that code. Thanks!

tonysumi commented 6 years ago

Hi, Regarding call Disconnect, which function get triggered when receiver disconnects the call? I've been trying to use the below one but It's not always called. Please guide me. @jefflinwood window.Twilio.Device.disconnect(function (connection) { }); Thanks

jefflinwood commented 6 years ago

Hi, fixed in https://github.com/jefflinwood/twilio_client_phonegap/pull/83