mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
* fix three panel layout height issue * rename websocket/services to websocket/persistence, implement LeaveRoom * cleanup * add new line eof * move route components from /components to /containers * remove duplicate style Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
16 lines
No EOL
388 B
TypeScript
16 lines
No EOL
388 B
TypeScript
import * as _ from "lodash";
|
|
|
|
export const ListRooms = {
|
|
id: ".Event_ListRooms.ext",
|
|
action: ({ roomList }, webClient) => {
|
|
webClient.persistence.room.updateRooms(roomList);
|
|
|
|
if (webClient.options.autojoinrooms) {
|
|
_.each(roomList, ({ autoJoin, roomId }) => {
|
|
if (autoJoin) {
|
|
webClient.commands.session.joinRoom(roomId);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}; |