From 3b4fb52bfee5d78d76269720d900dcf348c8dff4 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 21 Oct 2022 15:52:07 -0500 Subject: [PATCH] Fix pagination links not accounting for homeserver selection (#103) Fix https://github.com/matrix-org/matrix-public-archive/issues/93 Previously caused the `?homeserver` query parameter to be lost when paginating --- shared/viewmodels/RoomDirectoryViewModel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared/viewmodels/RoomDirectoryViewModel.js b/shared/viewmodels/RoomDirectoryViewModel.js index 491e393..bd1c38c 100644 --- a/shared/viewmodels/RoomDirectoryViewModel.js +++ b/shared/viewmodels/RoomDirectoryViewModel.js @@ -213,6 +213,7 @@ class RoomDirectoryViewModel extends ViewModel { get nextPageUrl() { if (this._nextPaginationToken) { return this._matrixPublicArchiveURLCreator.roomDirectoryUrl({ + homeserver: this.homeserverSelection, searchTerm: this.searchTerm, paginationToken: this._nextPaginationToken, }); @@ -224,6 +225,7 @@ class RoomDirectoryViewModel extends ViewModel { get prevPageUrl() { if (this._prevPaginationToken) { return this._matrixPublicArchiveURLCreator.roomDirectoryUrl({ + homeserver: this.homeserverSelection, searchTerm: this.searchTerm, paginationToken: this._prevPaginationToken, });