Fix multiple chat messages in one update appearing out of order
This commit is contained in:
parent
652a63e278
commit
022a5914c2
@ -524,8 +524,9 @@ function buildUpdates(data: Array<any>): DynmapUpdates {
|
||||
}
|
||||
}
|
||||
|
||||
//Sort chat by newest first
|
||||
updates.chat = updates.chat.sort((one, two) => {
|
||||
return one.timestamp - two.timestamp;
|
||||
return two.timestamp - one.timestamp;
|
||||
});
|
||||
|
||||
console.debug(`Updates: ${accepted} accepted. Rejected: `, dropped);
|
||||
|
Loading…
Reference in New Issue
Block a user