mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +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) => {
|
await Promise.all(_getRoomSockets(padID).map(async (roomSocket) => {
|
||||||
const s = sessioninfos[roomSocket.id];
|
const s = sessioninfos[roomSocket.id];
|
||||||
if (s) {
|
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
|
// Fixes: https://github.com/ether/etherpad-lite/issues/4120
|
||||||
// On restart author might not be populated?
|
// On restart author might not be populated?
|
||||||
if (author) {
|
if (author) {
|
||||||
author.id = s.author;
|
author.id = s.author;
|
||||||
padUsers.push(author);
|
padUsers.push(author);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue