fix: order

This commit is contained in:
cha0s 2020-12-14 12:31:07 -06:00
parent 296fe9543a
commit 78ffe9387c

View File

@ -10,8 +10,9 @@ export default (latus) => class ActivityServer extends Activity(latus) {
static async respond(packet, {req}) {
const {config: {'%redisAdapter': adapter}} = latus;
const rooms = promisify(adapter.allRooms.bind(adapter));
const chats = Array.from(new Set((await rooms())
.concat(['/r/reddichat', '/r/anonymous'])
const chats = Array.from(new Set(['/r/reddichat']
.concat(await rooms())
.concat(['/r/anonymous'])
.filter((room) => room.match(/^\/r\//))).values());
const activity = Object.fromEntries(await Promise.all(chats.map(async (chat) => [
chat,