UsernameMatchesExclusiveNamespaces will check if a given username matches any application service's exclusive users namespace
( cfg *config.ClientAPI, username string, )
| 469 | // UsernameMatchesExclusiveNamespaces will check if a given username matches any |
| 470 | // application service's exclusive users namespace |
| 471 | func 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 |
no outgoing calls
no test coverage detected