|
@@ -125,14 +125,14 @@ func (helper *CryptoHelper) loginBot() (*mautrix.Client, error) {
|
|
|
if err != nil {
|
|
|
return nil, fmt.Errorf("failed to get supported login flows: %w", err)
|
|
|
}
|
|
|
- if !flows.HasFlow(mautrix.AuthTypeAppservice) {
|
|
|
+ if !flows.HasFlow(mautrix.AuthTypeHalfyAppservice) {
|
|
|
return nil, fmt.Errorf("homeserver does not support appservice login")
|
|
|
}
|
|
|
// We set the API token to the AS token here to authenticate the appservice login
|
|
|
// It'll get overridden after the login
|
|
|
client.AccessToken = helper.bridge.AS.Registration.AppToken
|
|
|
resp, err := client.Login(&mautrix.ReqLogin{
|
|
|
- Type: mautrix.AuthTypeAppservice,
|
|
|
+ Type: mautrix.AuthTypeHalfyAppservice,
|
|
|
Identifier: mautrix.UserIdentifier{Type: mautrix.IdentifierTypeUser, User: string(helper.bridge.AS.BotMXID())},
|
|
|
DeviceID: deviceID,
|
|
|
InitialDeviceDisplayName: "WhatsApp Bridge",
|