fix: display correct button on unauthed room page
This commit is contained in:
@@ -177,13 +177,13 @@ func roomPageRoute(
|
||||
|
||||
// check session,
|
||||
session, err := getRequestSession(r, sessionSM)
|
||||
room, found, err := roomsM.Get(roomName)
|
||||
if err != nil || session.RoomId != roomName {
|
||||
log.Printf("not authed with session %+v | error %s, but for wrong room, trying to access %s", session, err, roomName)
|
||||
renderLoginPage(w, roomName)
|
||||
renderLoginPage(w, roomName, found)
|
||||
return
|
||||
}
|
||||
|
||||
room, found, err := roomsM.Get(roomName)
|
||||
if err != nil || !found {
|
||||
log.Printf("/room room for name %s not found or err: %s / found %t", roomName, err, found)
|
||||
// TODO here should be append to error place
|
||||
|
||||
Reference in New Issue
Block a user