Fix panic adding new room views from MainView.GetRoom()

This commit is contained in:
Tulir Asokan 2018-05-02 14:17:06 +03:00
parent 06e8f14c8a
commit 85cbd64c5e

View File

@ -327,7 +327,7 @@ func (view *MainView) addRoomPage(room *rooms.Room) {
func (view *MainView) GetRoom(roomID string) ifc.RoomView {
room, ok := view.rooms[roomID]
if !ok {
view.AddRoom(room.Room)
view.AddRoom(view.matrix.GetRoom(roomID))
room, ok := view.rooms[roomID]
if !ok {
return nil