Support authenticated media

This commit is contained in:
Nicolas Werner 2024-06-06 01:01:21 +02:00
parent d0d95df89d
commit 777c41daa1
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 5 additions and 5 deletions

View file

@ -606,7 +606,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 604a2ec95b03fbf8c856bc481e7582f5c6a64748 GIT_TAG a70753812e3fb832df12b24ee0ee6c70d68060d5
) )
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

@ -223,7 +223,7 @@ modules:
buildsystem: cmake-ninja buildsystem: cmake-ninja
name: mtxclient name: mtxclient
sources: sources:
- commit: 604a2ec95b03fbf8c856bc481e7582f5c6a64748 - commit: a70753812e3fb832df12b24ee0ee6c70d68060d5
#tag: v0.9.2 #tag: v0.9.2
type: git type: git
url: https://github.com/Nheko-Reborn/mtxclient.git url: https://github.com/Nheko-Reborn/mtxclient.git

View file

@ -3277,8 +3277,8 @@ TimelineModel::widgetLinks() const
QStringList list; QStringList list;
auto user = utils::localUser(); auto user = utils::localUser();
auto av = QUrl::toPercentEncoding( // auto av = QUrl::toPercentEncoding(
QString::fromStdString(http::client()->mxc_to_download_url(avatarUrl(user).toStdString()))); // 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"))
@ -3299,7 +3299,7 @@ TimelineModel::widgetLinks() const
url.replace("$matrix_user_id", user); url.replace("$matrix_user_id", user);
url.replace("$matrix_room_id", QUrl::toPercentEncoding(room_id_)); url.replace("$matrix_room_id", QUrl::toPercentEncoding(room_id_));
url.replace("$matrix_display_name", disp); url.replace("$matrix_display_name", disp);
url.replace("$matrix_avatar_url", av); // url.replace("$matrix_avatar_url", av);
url.replace("$matrix_widget_id", url.replace("$matrix_widget_id",
QUrl::toPercentEncoding(QString::fromStdString(p.content.id))); QUrl::toPercentEncoding(QString::fromStdString(p.content.id)));