• JC Brand's avatar
    Refactor chat rooms. · 450ce04f
    JC Brand authored
    When re-attaching to an existing session, chat rooms are fetched from
    sessionStorage and we join them again.
    
    However, unless we send a presence of type unavailable before reloading the
    page, from the XMPP server's perspective we never left the chat room.
    
    It therefore doesn't send us again the room occupants or room messages.
    
    To send a presence of type unavailable is a hack and not desireable. Rather, we
    want to stay in the room and just re-attach to it upon page reload.
    In order to do this, we need some new functionality.
    
    * Refactor the chat room sidebar into a new Backbone Model/View combo. (done).
    * Store/fetch room occupants in/from sessionStorage (done).
    * Store/fetch room messages in/from sessionStorage (not yet done).
    * Instead of re-joining a chat room which we never left, just register the event handlers again. (not yet done).
    450ce04f
converse.js 199 KB