MCPcopy Create free account
hub / github.com/daodst/chat / UsernameMatchesExclusiveNamespaces

Function UsernameMatchesExclusiveNamespaces

clientapi/routing/register.go:471–477  ·  view source on GitHub ↗

UsernameMatchesExclusiveNamespaces will check if a given username matches any application service's exclusive users namespace

(
	cfg *config.ClientAPI,
	username string,
)

Source from the content-addressed store, hash-verified

469// UsernameMatchesExclusiveNamespaces will check if a given username matches any
470// application service's exclusive users namespace
471func UsernameMatchesExclusiveNamespaces(
472 cfg *config.ClientAPI,
473 username string,
474) bool {
475 userID := userutil.MakeUserID(username, cfg.Matrix.ServerName)
476 return cfg.Derived.ExclusiveApplicationServicesUsernameRegexp.MatchString(userID)
477}
478
479// validateApplicationService checks if a provided application service token
480// corresponds to one that is registered. If so, then it checks if the desired

Callers 1

handleRegistrationFlowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected