PadMessageHandler: Delete unnecessary variables

to improve readability.
rhansen-chat
Richard Hansen 2021-12-07 03:22:34 -05:00
parent fec1bc0d4a
commit 9b7108d730
1 changed files with 3 additions and 8 deletions

View File

@ -466,18 +466,13 @@ const handleGetChatMessages = async (socket, {data: {start, end}}) => {
if (count < 0 || count > 100) throw new Error(`invalid number of messages: ${count}`);
const {padId, author: authorId} = sessioninfos[socket.id];
const pad = await padManager.getPad(padId, null, authorId);
const chatMessages = await pad.getChatMessages(start, end);
const infoMsg = {
socket.json.send({
type: 'COLLABROOM',
data: {
type: 'CHAT_MESSAGES',
messages: chatMessages,
messages: await pad.getChatMessages(start, end),
},
};
// send the messages back to the client
socket.json.send(infoMsg);
});
};
/**