* Refactor widget items to use same interface
* Support audio, video, generic file for pasting
* Add utils function for human readable file sizes
* Set correct MIME type for media messages
This change also determines the size of the upload once from the
ContentLengthHeader, rather than seeking the QIODevice and asking for
its size. This prevents any future trouble in case the QIODevice is
sequential (cannot be seeked). The MIME type is also determined at
upload once, rather than using the QIODevice and the underlying data
inside.
* Allow for file urls to be used as fall-back
This fixes an issue on macOS which uses `text/uri-list` for copying
files to the clipboard.
fixes#228
When a custom filter is inserted into nheko.conf or there was no filter
defined yet the default filter gets automatically uploaded.
After a successful upload the server-side generated filter-id is used.
This is done async as it is just an enhancement and it is not required
to upload the filter before the first request.
I had a look at sync.cpp and checked which parts of the sync response
are currently handled and which not. As I think it is unnecessary to let the
unhandled data be transmitted without being handled I added these filters.
In the same term I increased the timeout server-side to 30s as Riot
defaults to this value as well. Especially now when a lots of presence-updates
are not send anymore this value is more relevant.
It is now also possible to use a filter that is defined in`client/sync_filter`.
Advanced users might want to set an own filter here.
[ci skip]
* Initial "join room" feature.
* React correctly to remotely joined rooms.
* Leaving rooms implemented both locally using the room menu
in nheko, and reacting properly when leaving a room remotely
from another client.