From 0604b1d5b7b19db41096876d0d911ea95c3c778f Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 3 Aug 2020 18:44:35 -0500 Subject: Rename legacy PleromaFE Chat functionality to "Shout" --- src/modules/chat.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/modules/chat.js (limited to 'src/modules/chat.js') diff --git a/src/modules/chat.js b/src/modules/chat.js deleted file mode 100644 index ffeb272b..00000000 --- a/src/modules/chat.js +++ /dev/null @@ -1,34 +0,0 @@ -const chat = { - state: { - messages: [], - channel: { state: '' } - }, - mutations: { - setChannel (state, channel) { - state.channel = channel - }, - addMessage (state, message) { - state.messages.push(message) - state.messages = state.messages.slice(-19, 20) - }, - setMessages (state, messages) { - state.messages = messages.slice(-19, 20) - } - }, - actions: { - initializeChat (store, socket) { - const channel = socket.channel('chat:public') - - channel.on('new_msg', (msg) => { - store.commit('addMessage', msg) - }) - channel.on('messages', ({ messages }) => { - store.commit('setMessages', messages) - }) - channel.join() - store.commit('setChannel', channel) - } - } -} - -export default chat -- cgit v1.2.3-70-g09d2