librelist archives

« back to archive

Reconnect Issue

Reconnect Issue

From:
Gauri Padbidri
Date:
2015-06-22 @ 14:44
Hi JC,

 

As we know Auto-Reconnect does not work
<https://github.com/jcbrand/converse.js/issues/333#issuecomment-112110814> .
Can you kindly list me down the steps I need to do for UPDATING the Roster
List on Reconnect Success. I have modified the current code : 

this.onReconnected = function () {

            // We need to re-register all the event handlers on the newly

            // created connection.

            this.initStatus($.proxy(function () {

 

                this.rosterview.registerRosterXHandler(); // Bug in Converse
where previous statement was : this. registerRosterXHandler()

                this.rosterview.registerPresenceHandler(); // Bug in
Converse where previous statement was : this. registerPresenceHandler ()

                this.chatboxes.registerMessageHandler();

                // Remove existing

                this.chatboxviews.get('controlbox').initRoster();

                converse.xmppstatus.sendPresence();

                this.giveFeedback(__('Contacts'));

            }, this));

};

 

                Do I need to INVOKE the InitRoster() AFTER sending the XMPP
presence ? Also, if nothing works should it be good to replicate the
onConnected() API Code in onReconnected () ? Kindly help me fix this one,
that way I can contribute my code to GIT. 

Awaiting your response. Thanks !

 

Best Regards,

Gauri Padbidri

Re: [conversejs] Reconnect Issue

From:
Jc Brand
Date:
2015-06-22 @ 15:08
On Mon, Jun 22, 2015 at 08:14:23PM +0530, Gauri Padbidri wrote:
>    Hi JC,
> 
>    [1]As we know Auto-Reconnect does not work. Can you kindly list me down
>    the steps I need to do for UPDATING the Roster List on Reconnect Success.
>    I have modified the current code :
> 
>    this.onReconnected = function () {
>        // We need to re-register all the event handlers on the newly
>        // created connection.
>        this.initStatus($.proxy(function () {
>            this.rosterview.registerRosterXHandler(); // Bug in Converse 
where previous statement was : this. registerRosterXHandler()
>            this.rosterview.registerPresenceHandler(); // Bug in Converse
where previous statement was : this. registerPresenceHandler ()
>            this.chatboxes.registerMessageHandler();
> 
>            // Remove existing
>            this.chatboxviews.get('controlbox').initRoster();
>            converse.xmppstatus.sendPresence();
>            this.giveFeedback(__('Contacts'));
>        }, this));
>    };
> 
>    Do I need to INVOKE the InitRoster() AFTER sending the XMP
>    P presence ? Also, if nothing works should it be good to replicate the
>    onConnected() API Code in onReconnected () ? Kindly help me fix this one,
>    that way I can contribute my code to GIT.
> 
>    Awaiting your response. Thanks !
> 
>    Visible links
>    1. https://github.com/jcbrand/converse.js/issues/333#issuecomment-112110814

Gauri

In the bug report you link to, I asked you to create two tickets, which 
you didn't.

Why should I help you if you cannot even be bothered to write tickets for the
problems that you are having?

If you do create tickets, make sure to mention which version of 
converse.js you are using.

I'm not yet completely sure what exactly the underlying problem is that 
you are experiencing.

It sounds like there might be some roster related event handlers which 
need to be registered
again after reconnecting, but until I know exactly what's going wrong, I can't
know for sure what needs to be done.

JC