mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
19 lines
408 B
JavaScript
19 lines
408 B
JavaScript
"use strict";
|
|
|
|
const socket = require("../socket");
|
|
const {vueApp, findChannel} = require("../vue");
|
|
|
|
socket.on("more", function(data) {
|
|
const channel = findChannel(data.chan);
|
|
|
|
if (!channel) {
|
|
return;
|
|
}
|
|
|
|
channel.channel.moreHistoryAvailable = data.moreHistoryAvailable;
|
|
channel.channel.messages.unshift(...data.messages);
|
|
|
|
vueApp.$nextTick(() => {
|
|
channel.channel.historyLoading = false;
|
|
});
|
|
});
|