• JC Brand's avatar
    converse-muc: Fetch messages in the initialize method · 3faaf6a6
    JC Brand authored
    Lately we've been fetching messages only after entering the MUC, so that
    we already have occupants to attach to them (due to `fetchMembers` being
    called before) and thereby avoid rerenders.
    
    I've now moved message fetching into the `initialize` method and added
    missing event handlers for attaching/removing the occupant from a
    message as it comes online or goes offline.
    
    We still avoid (some) rerenders because we fetch and wait for cached
    occupants before fetching cached messages and we wait for `fetchMembers`
    before triggering `enteredNewRoom` which causes MAM messages to be
    fetched.
    3faaf6a6
muc_messages.js 49.1 KB