diaspora / jsxc

Real-time chat app

Home Page:www.jsxc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic connection

opened this issue · comments

It was available in a previous version. Why was it removed?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

it is not asynchronous (see #88)

Meh :(

still was requested a couple of times. but it should be possible to opt-out for a user

This is pretty important as otherwise users seem to simply assume Chat isn't working. I've attempted to roll back the following change: 44cd6ac however after verifying that the template was successfully compiled into the minified javascript and deployed to the CDN the behavior regarding login remains the same.

Do you have any suggestions on how to force this behavior?

Thanks!

@lancegilbert if you want to enable it on login add to app/assets/javascript/jsxc.js at the bottom following line jsxc.xmpp.login();

We haven't done this in respect of privacy matters.

@zauberstuhl Thank you!

Would you be open to having this be a user-configurable option which is by default set to false, with said default being configurable via the pod configuration?

The same goes with the chat enable on the aspect being set to false by default - I would also like to expose the default chat-enabled setting for aspects into a per user setting which is false by default but with that default being configurable via the pod config.

Generally speaking I'm trying to create a zero-friction embedded chat solution for my pod and would prefer to find a way to make my changes suitable for pull-requests. (Even if that means making all of my changes no-op unless overridden by a config option)

Edit:
After trying your change and having some issues I went digging, and it seems like this might be a more correct way of triggering the automatic login? (Diff attached)

jsxc.js.diff.txt

commented

We haven't done this in respect of privacy matters.

We should discuss about that on loomio ;)

After trying your change and having some issues I went digging, and it seems like this might be a more correct way of triggering the automatic login? (Diff attached)

change-state does mostly the same (https://github.com/diaspora/jsxc/blob/develop/src/jsxc.lib.gui.js#L1196), but yes that works as well :)

Would you be open to having this be a user-configurable option which is by default set to false, with said default being configurable via the pod configuration?

The user should be able to set this in his privacy section.

Thank you for taking a pass at this!

I was actually making some very similar changes, however I was trying to store off any explicitly set user presence states.

For instance, if a user:

  • Has automatic connection enabled
  • Is automatically set to 'online' after page load
  • Explicitly sets their presence to 'away'
  • Navigates to another page

Will the presence be forced again to 'online' or will the 'away' state be preserved?

I was trying to store off whatever the most recent presence was then try to restore that on page load, but perhaps the extra work is unnecessary?

good call I shouldn't use the presence function, I will update that tomorrow \m/