Handle CHATHISTORY messages when reaching end of batch
Closes: https://todo.sr.ht/~emersion/gamja/115
This commit is contained in:
@@ -886,7 +886,7 @@ export default class Client extends EventTarget {
|
||||
let max = Math.min(limit, this.isupport.chatHistory());
|
||||
let params = ["BEFORE", target, "timestamp=" + before, max];
|
||||
return this.roundtripChatHistory(params).then((messages) => {
|
||||
return { more: messages.length >= max };
|
||||
return { messages, more: messages.length >= max };
|
||||
});
|
||||
}
|
||||
|
||||
@@ -904,7 +904,7 @@ export default class Client extends EventTarget {
|
||||
after.time = messages[messages.length - 1].tags.time;
|
||||
return this.fetchHistoryBetween(target, after, before, limit);
|
||||
}
|
||||
return null;
|
||||
return { messages };
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user