priyadi / roundcube-converse.js-xmpp-plugin

XMPP plugin for Roundcube Webmail based on converse.js
48 stars 18 forks source link

Going Offline from Roundcube interface #11

Open sandipgangdhar opened 10 years ago

sandipgangdhar commented 10 years ago

HI,

first of all thank for sharing such a wonderful chat client.

Currently we are using ejabberd as XMPP server and pidgin as XMPP Client.

I have successfully configured Converse plugin in my roundcube and we are able to chat with cross domain users as well. Problem that I am facing is, when I change my status to offline from webmail and check the XMPP status from any other XMPP client (like pidgin) the account (the account from which I logged in in webmail) shows on line. Furthermore I have tested by logging off from webmail interface but still XMPP status of the account (the account from which I logged in in webmail) shows on line in pidgin. If we logout and login again with pidgin account the status of webmail account shows offline i.e. we need to logout and login again to see the actual status of webmail account.

Can you please check the same, and let me know where I am missing my configuration.

Thanks & Kind Regards, SAndip.........!

priyadi commented 10 years ago

Hi,

when I change my status to offline from webmail and check the XMPP status from any other XMPP client (like pidgin) the account (the account from which I logged in in webmail) shows on line

Actually I'm in the same situation and always assumed this is because the XMPP server (mine is Prosody) doesn't support offline presence. In my case, this is what converse sent to XMPP server:

<body rid='1277303839' xmlns='http://jabber.org/protocol/httpbind' sid='476183db444a23e6be48ba5f2e3164723ef95ba9'><presence xmlns='jabber:client'><show>offline</show></presence><iq type='get' xmlns='jabber:client' id='9996:sendIQ'><vCard xmlns='vcard-temp'/></iq></body>

And the server simply ignored it.

You can try the demo client at http://conversejs.org and see if you get the same result.

What we need is an option to disable offline switch for the servers that don't support it. This needs to be done at converse.js.

Furthermore I have tested by logging off from webmail interface but still XMPP status of the account (the account from which I logged in in webmail) shows on line in pidgin.

We currently do not log out the XMPP session on Roundcube log out. You need to wait until BOSH session is expired. With most servers, that should happen in exactly one minute.

jseidl commented 10 years ago

We could add to converse.js an option to treat offline mode as either presence or termination. Other thing is to add support for strophe's ping module for servers that support them.

priyadi commented 10 years ago

@jseidl I prefer we disable offline mode if the server doesn't use it. If we treat it as termination, it will become less seamless, because user will need to enter their password again if he decides to reconnect. Someone needs to figure out how to handle this correctly if we are going with termination route.

mckaygerhard commented 10 years ago

@priyadi can we take the credentials encrypted from user session in browser? so can enable offline mode? and pass hiden encrypted in embebed form in the chat window?

priyadi commented 10 years ago

@mckaygerhard no, it is not that simple. you will need to take the issue upstream to converse.js.

mckaygerhard commented 10 years ago

well in upstream there's a issue around that problem already opened.. and i commented yet.. in any case we need to keep track of that..