Send a pseudo-reply consisting of two messages: a `m.text` which is just
a reply with an empty body, then the file event itself.
This is a workaround to the restriction imposed by the Matrix API,
which prevents us from simply attaching a reply to a media event:
https://matrix.org/docs/spec/client_server/latest#rich-replies
These cause problems with the composer alias parsing code.
If an alias from the config file has whitespace, only the first word
will be taken into account (ignoring any leading or trailing whitespace).
Simplify the code, make it more declarative, and improve the reliability
of sending typing notifications (notably when changing the used alias in
the middle of a message).
If the chat was opened under e.g. "@user1:example.org", but the
composer text is "o abc" where "o" is a composer alias for
"@other_account:example.org", save the composer text to state.json as
"@user1:example.org" and not the alias user.
thumbnail() and download() were remaining.
Use a direct and carefully chosen MatrixClient's methods instead to
avoid problems mentioned in the previous commit 7502c1.
Causes problem if one of the candidate client is on a server that
doesn't federate (e.g. a local one). Move the `get_profile()` function
from Backend to MatrixClient.
Having a HoverHandler covering the root ApplicationWindow causes
problems for some Qt Quick Controls with pen/touch, e.g. it's impossible
to focus a TextArea/TextField.
The HoverHandler is moved to HToolTip (since it's used for those),
targets the ApplicationWindow but is now only enabled while a tooltip is
visible.
Fix the AutoCompletedMembers filter model to ensure that it doesn't
pick all the items from the corresponding room member model on startup,
wait until the user actually uses the completion feature to fill it.
If the display name of a user is blank (e.g. just a space character),
autocomplete it as a user ID.
If the display name starts or ends with whitespace, trim it.
`preeditText` is partial input from IME and touchscreen
autocompleting keyboards, consider it together with `text` for the
`getWordAt()` function.
This should allow user autocompletion to work properly in these
specific conditions.
Bug introduced in 6b907, made the cursor stay as a normal arrow when
hovering text fields/areas inside a HFlickable due to the
HKineticScrollingDisabler's width/height being incorrectly set.