Fix avatar url conversion for widgets

This commit is contained in:
Nicolas Werner 2022-02-04 23:33:00 +01:00
parent 7b00411dc4
commit 1dacf327e1
3 changed files with 3 additions and 3 deletions

View file

@ -402,7 +402,7 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare( FetchContent_Declare(
MatrixClient MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git 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_EXAMPLES OFF CACHE INTERNAL "")
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")

View file

@ -191,7 +191,7 @@ modules:
buildsystem: cmake-ninja buildsystem: cmake-ninja
name: mtxclient name: mtxclient
sources: sources:
- commit: 29b46c872576d88797178d3c147e8b12b1ac8693 - commit: 8c03d9ac58274695a71d0eb32519ebce29bc536e
#tag: v0.6.1 #tag: v0.6.1
type: git type: git
url: https://github.com/Nheko-Reborn/mtxclient.git url: https://github.com/Nheko-Reborn/mtxclient.git

View file

@ -2248,7 +2248,7 @@ TimelineModel::widgetLinks() const
QStringList list; QStringList list;
auto user = utils::localUser(); 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 disp = QUrl::toPercentEncoding(displayName(user));
auto theme = UserSettings::instance()->theme(); auto theme = UserSettings::instance()->theme();
if (theme == QStringLiteral("system")) if (theme == QStringLiteral("system"))