• JC Brand's avatar
    Re-add the `keepalive` options. · ea36d53f
    JC Brand authored
    It's unlikely that `keepalive` needs to be set to `false`, but there are
    some edge cases where it might be useful.
    
    Here's a breakdown of the different configurations of `keepalive` and `auto_join`:
    
    ---
    
    * auto_login: false, keepalive: true
    
    This is the default config. Users need to log in manually, but then
    Converse will try to reconnect them when the page reloads.
    
    * auto_login: true, keepalive: true
    
    Also very popular configuration. Used with `credentials_url` or `prebind_url`.
    
    * auto_login = `true`, keepalive = `false`
    
    Not sure what this could be useful for. No currently known application.
    
    * auto_login = `false`, keepalive = `false`
    
    Useful when you want some kind of specific action to trigger login, but
    you don't want to maintain that state across page reloads.
    
    Also relevant when using a websocket connection with anonymous login.
    With websocket it's impossible to maintain anonymous sessions across page
    reload because the the session gets removed server-side as soon as the
    websocket connection drops and the server won't accept a full JID with
    password for an anonymous connection anyway (which could happen upon
    page reload when Converse tries to login in again if `keepalive` was `true`).
    ea36d53f
configuration.rst 54.4 KB