Looks like the subsription flow was broken since the roster groups refactor.
Requesting and pending contacts weren't being properly added to (and removed
from) roster groups.
Requesting contacts are now properly added and remove. Next up, handling
outgoing requets (i.e. pending contacts).
When loading a page with an existing session, the roster view's elements were
being added too early, resulting in event handlers not being properly
registered.
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).
onChatRoomPresence and showStatusMessages have been refactored to give more
detailed information and to also show the reasons given to actions taken by
moderators.
* Filter by both fullname and jid when searching for users to invite.
* Combine the confirm and prompt popups into a single confirm popup.
* Bugfix in groups filter. Make sure to show group that were previously filtered out.
Otherwise the index of the element relative to which we place it changes
depending on whether the element being positioned is placed before or after it.
* Make sure that the roster container has a fixed height, so that we can better
check whether the roster is overflowing.
* Call update after inserting the roster into the DOM