2020-02-28 15:01:17 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
import socket from "../socket";
|
|
|
|
import store from "../store";
|
|
|
|
|
2020-03-21 20:55:36 +00:00
|
|
|
socket.on("history:clear", function (data) {
|
2020-02-28 15:01:17 +00:00
|
|
|
const {channel} = store.getters.findChannel(data.target);
|
|
|
|
|
|
|
|
channel.messages = [];
|
|
|
|
channel.unread = 0;
|
|
|
|
channel.highlight = 0;
|
|
|
|
channel.firstUnread = 0;
|
|
|
|
channel.moreHistoryAvailable = false;
|
|
|
|
});
|