export default class Room { constructor(room, thread) { this.id = room.id; this.user = room.user; this.userId = room.userId; this.roomName = room.roomName; this.mailboxId = room.mailboxId; this.unseen = room.unseen; this.messages = []; this.messagesFetched = false; if (!thread) { this.threads = [ // new Room({id:12, user: this.user, roomName: "thread 1", mailbboxId:this.mailboxId}, true), // new Room({id:12, user: this.user, roomName: "thread 1", mailbboxId:this.mailboxId}, true), // new Room({id:12, user: this.user, roomName: "thread 1", mailbboxId:this.mailboxId}, true), ]; } else { this.threads = []; } } }