From c6462e11ecd385eb1bb6c0c7f5279aaef1b8584a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 4 Jun 2020 12:12:09 +0200 Subject: [PATCH] Searching: Fix some lint issues. --- src/Searching.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Searching.js b/src/Searching.js index 42a092edb0..6932836273 100644 --- a/src/Searching.js +++ b/src/Searching.js @@ -159,7 +159,7 @@ async function localSearch(searchTerm, roomId = undefined, processResult = true) const result = { response: localResult, query: searchArgs, - } + }; return result; } @@ -291,7 +291,7 @@ function combineResponses(previousSearchResult, localEvents = undefined, serverE console.log("HELLOO COMBINING RESULTS", localEvents, serverEvents, response); - return response + return response; } async function combinedPagination(searchResult) { @@ -307,11 +307,13 @@ async function combinedPagination(searchResult) { const oldestEventFrom = searchResult.oldestEventFrom; - if ((searchArgs.next_batch && oldestEventFrom === "server") || (!searchResult.serverSideNextBatch && searchArgs.next_batch)) { + if ((searchArgs.next_batch && oldestEventFrom === "server") || + (!searchResult.serverSideNextBatch && searchArgs.next_batch)) { localResult = await eventIndex.search(searchArgs); } - if ((searchResult.serverSideNextBatch && oldestEventFrom === "local") || (!searchArgs.next_batch && searchResult.serverSideNextBatch)) { + if ((searchResult.serverSideNextBatch && oldestEventFrom === "local") || + (!searchArgs.next_batch && searchResult.serverSideNextBatch)) { const body = {body: searchResult._query, next_batch: searchResult.serverSideNextBatch}; serverSideResult = await client.search(body); } @@ -336,7 +338,7 @@ async function combinedPagination(searchResult) { searchResult.pendingRequest = null; - return result + return result; } function eventIndexSearch(term, roomId = undefined) { @@ -378,7 +380,7 @@ function eventIndexSearchPagination(searchResult) { const promise = combinedPagination(searchResult); searchResult.pendingRequest = promise; - return promise + return promise; } }