Fix variable shadowing

This commit is contained in:
Nicolas Werner 2023-07-05 10:24:38 +02:00
parent ad6e4fef64
commit d81b14b77b
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 6 additions and 7 deletions

View file

@ -1686,17 +1686,17 @@ utils::removeExpiredEvents()
});
} else if (!state->currentRoom.empty()) {
mtx::http::MessagesOpts opts{};
opts.dir = mtx::http::PaginationDirection::Backwards;
opts.from = state->currentRoomPrevToken;
opts.limit = 1000;
opts.filter = state->filter;
opts.dir = mtx::http::PaginationDirection::Backwards;
opts.from = state->currentRoomPrevToken;
opts.limit = 1000;
opts.filter = state->filter;
opts.room_id = state->currentRoom;
http::client()->messages(
opts,
[state = std::move(state)](const mtx::responses::Messages &msgs,
mtx::http::RequestErr e) mutable {
if (e || msgs.chunk.empty()) {
mtx::http::RequestErr error) mutable {
if (error || msgs.chunk.empty()) {
state->currentRoom.clear();
state->currentRoomCount = 0;
state->currentRoomPrevToken.clear();

View file

@ -64,4 +64,3 @@ private:
void load();
};