thelounge/client/js/socket-events/history_clear.js
2020-03-21 22:55:36 +02:00

14 lines
321 B
JavaScript

"use strict";
import socket from "../socket";
import store from "../store";
socket.on("history:clear", function (data) {
const {channel} = store.getters.findChannel(data.target);
channel.messages = [];
channel.unread = 0;
channel.highlight = 0;
channel.firstUnread = 0;
channel.moreHistoryAvailable = false;
});