thelounge/client/js/socket-events/topic.js

13 lines
233 B
JavaScript
Raw Normal View History

2017-05-18 22:08:54 +02:00
"use strict";
const socket = require("../socket");
2018-07-12 20:36:44 +02:00
const {findChannel} = require("../vue");
2017-05-18 22:08:54 +02:00
socket.on("topic", function(data) {
2018-07-12 21:06:17 +02:00
const channel = findChannel(data.chan);
2018-07-12 20:36:44 +02:00
if (channel) {
channel.channel.topic = data.topic;
}
2017-05-18 22:08:54 +02:00
});