mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
client loads messages using the new client loads messages using new method, getChatMessages restructured and renamed to getLastChatMessages, added GET_CHAT_MESSAGES, getChatMessages restructured and renamed to getLastChatMessages
This commit is contained in:
parent
9484b92ae2
commit
5592c4b0fe
5 changed files with 108 additions and 47 deletions
|
@ -400,7 +400,19 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
}
|
||||
else if (msg.type == "CHAT_MESSAGE")
|
||||
{
|
||||
chat.addMessage(msg, true);
|
||||
chat.addMessage(msg, true, false);
|
||||
}
|
||||
else if (msg.type == "CHAT_MESSAGES")
|
||||
{
|
||||
for(var i = msg.messages.length - 1; i >= 0; i--)
|
||||
{
|
||||
chat.addMessage(msg.messages[i], true, true);
|
||||
}
|
||||
if(!chat.gotInitalMessages)
|
||||
{
|
||||
chat.scrollDown();
|
||||
chat.gotInitalMessages = true;
|
||||
}
|
||||
}
|
||||
else if (msg.type == "SERVER_MESSAGE")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue