mirror of https://github.com/vector-im/riot-web
EventIndex: Fix some lint issues.
parent
f802668fff
commit
ea35fc2881
|
@ -244,8 +244,8 @@ export default class EventIndex extends EventEmitter {
|
||||||
if (room === null) return;
|
if (room === null) return;
|
||||||
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return;
|
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return;
|
||||||
|
|
||||||
console.log("EventIndex: Added checkpoint because of a limited timeline",
|
console.log("EventIndex: Adding a checkpoint because of a limited timeline",
|
||||||
backwardsCheckpoint);
|
room.roomId);
|
||||||
|
|
||||||
this.addRoomCheckpoint(room.roomId, false);
|
this.addRoomCheckpoint(room.roomId, false);
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ export default class EventIndex extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
async addEventsFromLiveTimeline(timeline) {
|
async addEventsFromLiveTimeline(timeline) {
|
||||||
let events = timeline.getEvents();
|
const events = timeline.getEvents();
|
||||||
|
|
||||||
for (let i = 0; i < events.length; i++) {
|
for (let i = 0; i < events.length; i++) {
|
||||||
const ev = events[i];
|
const ev = events[i];
|
||||||
|
@ -330,9 +330,9 @@ export default class EventIndex extends EventEmitter {
|
||||||
if (!room) return;
|
if (!room) return;
|
||||||
|
|
||||||
const timeline = room.getLiveTimeline();
|
const timeline = room.getLiveTimeline();
|
||||||
let token = timeline.getPaginationToken("b");
|
const token = timeline.getPaginationToken("b");
|
||||||
|
|
||||||
if(!token) {
|
if (!token) {
|
||||||
// The room doesn't contain any tokens, meaning the live timeline
|
// The room doesn't contain any tokens, meaning the live timeline
|
||||||
// contains all the events, add those to the index.
|
// contains all the events, add those to the index.
|
||||||
await this.addEventsFromLiveTimeline(timeline);
|
await this.addEventsFromLiveTimeline(timeline);
|
||||||
|
@ -348,7 +348,7 @@ export default class EventIndex extends EventEmitter {
|
||||||
|
|
||||||
console.log("EventIndex: Adding checkpoint", checkpoint);
|
console.log("EventIndex: Adding checkpoint", checkpoint);
|
||||||
|
|
||||||
try{
|
try {
|
||||||
await indexManager.addCrawlerCheckpoint(checkpoint);
|
await indexManager.addCrawlerCheckpoint(checkpoint);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("EventIndex: Error adding new checkpoint for room",
|
console.log("EventIndex: Error adding new checkpoint for room",
|
||||||
|
|
Loading…
Reference in New Issue