mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Add default case and comment to r.Preset switch
This commit is contained in:
parent
f1e1e39499
commit
7575d8487c
|
|
@ -169,7 +169,7 @@ func createRoom(req *http.Request, device *authtypes.Device,
|
|||
|
||||
var joinRules, historyVisibility string
|
||||
switch r.Preset {
|
||||
case presetPrivateChat, "":
|
||||
case presetPrivateChat:
|
||||
joinRules = joinRuleInvite
|
||||
historyVisibility = historyVisibilityShared
|
||||
case presetTrustedPrivateChat:
|
||||
|
|
@ -179,6 +179,11 @@ func createRoom(req *http.Request, device *authtypes.Device,
|
|||
case presetPublicChat:
|
||||
joinRules = joinRulePublic
|
||||
historyVisibility = historyVisibilityShared
|
||||
default:
|
||||
// Default room rules, r.Preset was previously checked for valid values so
|
||||
// only a request with no preset should end up here.
|
||||
joinRules = joinRuleInvite
|
||||
historyVisibility = historyVisibilityShared
|
||||
}
|
||||
|
||||
var builtEvents []gomatrixserverlib.Event
|
||||
|
|
|
|||
Loading…
Reference in a new issue