mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Move bridge permission config from mautrix-whatsapp
This commit is contained in:
parent
7f7f4896f8
commit
2c92f0b465
7 changed files with 96 additions and 22 deletions
10
id/userid.go
10
id/userid.go
|
|
@ -52,6 +52,16 @@ func (userID UserID) Parse() (localpart, homeserver string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (userID UserID) Localpart() string {
|
||||
localpart, _, _ := userID.Parse()
|
||||
return localpart
|
||||
}
|
||||
|
||||
func (userID UserID) Homeserver() string {
|
||||
_, homeserver, _ := userID.Parse()
|
||||
return homeserver
|
||||
}
|
||||
|
||||
// URI returns the user ID as a MatrixURI struct, which can then be stringified into a matrix: URI or a matrix.to URL.
|
||||
//
|
||||
// This does not parse or validate the user ID. Use the ParseAndValidate method if you want to ensure the user ID is valid first.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue