diff --git a/custompuppet.go b/custompuppet.go index 8ea2593d..b1aa2176 100644 --- a/custompuppet.go +++ b/custompuppet.go @@ -22,6 +22,7 @@ import ( "encoding/hex" "errors" "fmt" + "strings" "maunium.net/go/mautrix" "maunium.net/go/mautrix/appservice" @@ -86,6 +87,9 @@ func (user *User) loginWithSharedSecret() error { if loginSecret == "appservice" { client.AccessToken = user.bridge.AS.Registration.AppToken req.Type = mautrix.AuthTypeAppservice + } else if strings.HasPrefix(loginSecret, "as_token:") { + client.AccessToken = loginSecret[9:] + req.Type = mautrix.AuthTypeAppservice } else { mac := hmac.New(sha512.New, []byte(loginSecret)) mac.Write([]byte(user.MXID))