Merge pull request #1544 from thelounge/xpaw/fix-more-condensed

Fix history not loading if first message is condensed
This commit is contained in:
Jérémie Astori 2017-09-19 18:37:53 -04:00 committed by GitHub
commit 1dae995631

View File

@ -79,11 +79,11 @@ socket.on("more", function(data) {
chat.on("click", ".show-more-button", function() {
const self = $(this);
const lastMessage = self.closest(".chat").find(".msg").first();
const lastMessage = self.closest(".chat").find(".msg:not(.condensed)").first();
let lastMessageId = -1;
if (lastMessage.length > 0) {
lastMessageId = parseInt(lastMessage[0].id.replace("msg-", ""), 10);
lastMessageId = parseInt(lastMessage.attr("id").replace("msg-", ""), 10);
}
self