From 1dacf327e1164cd3040407cd25716ac159d0e22e Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 4 Feb 2022 23:33:00 +0100 Subject: [PATCH] Fix avatar url conversion for widgets --- CMakeLists.txt | 2 +- io.github.NhekoReborn.Nheko.yaml | 2 +- src/timeline/TimelineModel.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fa41ba5..5ee7b972 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -402,7 +402,7 @@ if(USE_BUNDLED_MTXCLIENT) FetchContent_Declare( MatrixClient GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git - GIT_TAG 29b46c872576d88797178d3c147e8b12b1ac8693 + GIT_TAG 8c03d9ac58274695a71d0eb32519ebce29bc536e ) set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") diff --git a/io.github.NhekoReborn.Nheko.yaml b/io.github.NhekoReborn.Nheko.yaml index ed76deba..57140108 100644 --- a/io.github.NhekoReborn.Nheko.yaml +++ b/io.github.NhekoReborn.Nheko.yaml @@ -191,7 +191,7 @@ modules: buildsystem: cmake-ninja name: mtxclient sources: - - commit: 29b46c872576d88797178d3c147e8b12b1ac8693 + - commit: 8c03d9ac58274695a71d0eb32519ebce29bc536e #tag: v0.6.1 type: git url: https://github.com/Nheko-Reborn/mtxclient.git diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index d1613d5b..6fc10142 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -2248,7 +2248,7 @@ TimelineModel::widgetLinks() const QStringList list; auto user = utils::localUser(); - auto av = QUrl::toPercentEncoding(avatarUrl(user)); + auto av = QUrl::toPercentEncoding(QString::fromStdString(http::client()->mxc_to_download_url(avatarUrl(user).toStdString()))); auto disp = QUrl::toPercentEncoding(displayName(user)); auto theme = UserSettings::instance()->theme(); if (theme == QStringLiteral("system"))