diff options
Diffstat (limited to 'session.go')
-rw-r--r-- | session.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -86,7 +86,12 @@ func (s *Session) LoadNextBatch(_ string) string { } func (s *Session) LoadRoom(mxid string) *gomatrix.Room { - return s.Rooms[mxid] + room, ok := s.Rooms[mxid] + if !ok || room == nil { + room := gomatrix.NewRoom(mxid) + s.SaveRoom(room) + } + return room } func (s *Session) SaveFilterID(_, filterID string) { |