mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
PadMessageHandler: Delete unnecessary use of Promise.then()
This commit is contained in:
parent
15dba7d886
commit
9cd67cd990
1 changed files with 7 additions and 8 deletions
|
@ -1438,14 +1438,13 @@ exports.padUsers = async (padID) => {
|
|||
await Promise.all(_getRoomSockets(padID).map(async (roomSocket) => {
|
||||
const s = sessioninfos[roomSocket.id];
|
||||
if (s) {
|
||||
return authorManager.getAuthor(s.author).then((author) => {
|
||||
const author = await authorManager.getAuthor(s.author);
|
||||
// Fixes: https://github.com/ether/etherpad-lite/issues/4120
|
||||
// On restart author might not be populated?
|
||||
if (author) {
|
||||
author.id = s.author;
|
||||
padUsers.push(author);
|
||||
}
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue