Bug: Room#leave() removes event listeners, makes it so you can't join anymore!

This is a possible bug, depending on how the XIFF developers wanted to approach it I guess. I am writing an app which is very often leaving/joining MUC rooms, and I was using one Room object and I noticed though the first join() worked, the 2nd did not.

Note: I do leave() then wait for the ROOM_LEAVE event, then try to join using join() again.

Digging through XIFF code, in Room.as around line 350 and then in handleEvent, I noticed that one disconnect XIFF removes all event handlers! This means the only way to join again is to create a new Room object, which is what I am doing now.

Is this working as intended? It seems wrong. If anything it should re-add the event listeners in the join() command, I would think.

If I remember correctly that was intentional, but I agree that re-adding on join() would make somewhat more sense.