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
This commit is contained in:
Eric Eastwood 2022-10-21 15:52:07 -05:00 committed by GitHub
parent 048f03fff7
commit 3b4fb52bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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,
});