Finish spec-compliant room naming and add docs for room.go

This commit is contained in:
Tulir Asokan
2018-03-20 21:25:13 +02:00
parent 095b982603
commit dd009a9dbc
2 changed files with 100 additions and 35 deletions

View File

@ -96,7 +96,7 @@ func (s *Session) LoadNextBatch(_ string) string {
func (s *Session) GetRoom(mxid string) *rooms.Room {
room, _ := s.Rooms[mxid]
if room == nil {
room = rooms.NewRoom(mxid)
room = rooms.NewRoom(mxid, s.MXID)
s.Rooms[room.ID] = room
}
return room