Only fetch messages after we have the latest room features
Otherwise we run into race conditions where MAM messages are fetched
before we know whether (updated) the room supports MAM or not.
Unfortunately this doesn't work on Firefox and there's no proper
workaround. https://github.com/philipwalton/flexbugs/issues/108
Reverts:
Revert "Bugfix. Properly insert error messages and spinner"
This reverts commit 6a419cc145.
Revert "Use flexbox to keep the chat scrolled down"
This reverts commit dd91d3cc55.
By using `display: flex` and `flex-direction: column-reverse`, the chat
now automatically scrolls down when loaded, without requiring any
extra JavaScript.
We still need to scroll down with JavaScript when sending a message.
By using `column-reverse`, the messages container now works in reverse.
So the newest message is the first element in the container and the
oldest message is the last. This is the reverse of before.
Due to this, this change will likely break some plugins.
and also first check whether we have an occupant with that nickname.
Since roles are session based, it doesn't make any sense to try to
modify the role for a user not in the room.
- Use native `getTime` method instead of moment's `valueOf`
- Use toISOString() instead of moment().format()
This makes the code timezone independent since we're now globally using UTC.
That way we don't lose the user's input values, we avoid flashing and we
avoid unnecessary rendering.
In the process, fixed an annoying issue where Chrome auto-completes
what it thinks is the username into the "Language Tag" field of the MUC
config form.
Instead we tell Chrome that the MUC JID is the username, thereby also
letting it save the password to to that JID.
When set, the "Nickname" field won't be shown in the "Add groupchat"
modal and instead the nickname will be automatically set (based on other
config settings).
- Combine all test init functions into `initConverse`
- Use `async` functions in more tests
- Replace `var` with `let` and `const` in more tests
- New utils method `toStanza` which converts a string to a Node