tryJoin :: LocationId -> LocationAction LocationView
tryJoin locationId = do
    userId <- getCurrentUserId
    oldLocationId <- getUserLocation userId
    canLeave <- canLeave oldLocationId
    canJoin <- canJoin locationId
    if canJoin && canLeave then join locationId else view oldLocationId
tryJoin :: LocationId -> LocationAction LocationView
tryJoin locationId = do
    userId <- getCurrentUserId
    oldLocationId <- getUserLocation userId
    canLeave <- canLeave oldLocationId
    canJoin <- canJoin locationId
    if canJoin && canLeave then join locationId else view oldLocationId
tryJoin locationId = do
    userId <- getCurrentUserId
    oldLocationId <- getUserLocation userId
    canLeave <- canLeave oldLocationId
    canJoin <- canJoin locationId
    if canJoin && canLeave then join locationId else view oldLocationId