Fix sending files on android
Requires https://github.com/quotient-im/libQuotient/pull/585
This commit is contained in:
@@ -63,9 +63,9 @@ void ActionsHandler::handleMessage()
|
|||||||
{
|
{
|
||||||
checkEffects();
|
checkEffects();
|
||||||
if (!m_room->chatBoxAttachmentPath().isEmpty()) {
|
if (!m_room->chatBoxAttachmentPath().isEmpty()) {
|
||||||
auto path = m_room->chatBoxAttachmentPath();
|
QUrl url(m_room->chatBoxAttachmentPath());
|
||||||
path = path.mid(path.lastIndexOf('/') + 1);
|
auto path = url.isLocalFile() ? url.toLocalFile() : url.toString();
|
||||||
m_room->uploadFile(m_room->chatBoxAttachmentPath(), m_room->chatBoxText().isEmpty() ? path : m_room->chatBoxText());
|
m_room->uploadFile(path, m_room->chatBoxText().isEmpty() ? path.mid(path.lastIndexOf('/') + 1) : m_room->chatBoxText());
|
||||||
m_room->setChatBoxAttachmentPath({});
|
m_room->setChatBoxAttachmentPath({});
|
||||||
m_room->setChatBoxText({});
|
m_room->setChatBoxText({});
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user