messages = [ { messageid: 98568, timestamp: 1630000000000, author: { name: "Velecísař Empy", id: 1, }, content: "Test message 01", }, { messageid: 98868, timestamp: 1640000000000, author: { name: "Velecísař Empy 2", id: 2, }, content: "Test message 02", }, { messageid: 96666, timestamp: 1650000000000, author: { name: "Velecísař Empy", id: 1, }, content: "Test message 03\n\n\n\n\nPokračování\ntest\na\na\n\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n\na\na\na\na\na\na\na\na\na\n\na\na\na\na\na\na\na\na\na\n\na\na\na\na\na\na\na\na\na\n", }, ]; const messagesDescending = messages.sort((a, b) => a.timestamp - b.timestamp); let htmlString = ""; const currentUser = { name: "Velecísař Empy", id: 1, }; messagesDescending.forEach((obj) => { var meAuthor = obj.author.id == currentUser.id; var tempString = ""; if (meAuthor) { tempString = '