forked from MirrorHub/mautrix-whatsapp
Use constants for homeserver software checks
This commit is contained in:
parent
2e934abe43
commit
e0294b64dd
2 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ func (config *Config) CanDoublePuppetBackfill(userID id.UserID) bool {
|
|||
}
|
||||
_, homeserver, _ := userID.Parse()
|
||||
// Batch sending can only use local users, so don't allow double puppets on other servers.
|
||||
if homeserver != config.Homeserver.Domain && config.Homeserver.Software != "hungry" {
|
||||
if homeserver != config.Homeserver.Domain && config.Homeserver.Software != bridgeconfig.SoftwareHungry {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
2
user.go
2
user.go
|
@ -1081,7 +1081,7 @@ func (user *User) UpdateDirectChats(chats map[id.UserID][]id.RoomID) {
|
|||
}
|
||||
user.log.Debugln("Updating m.direct list on homeserver")
|
||||
var err error
|
||||
if user.bridge.Config.Homeserver.Software == "asmux" {
|
||||
if user.bridge.Config.Homeserver.Software == bridgeconfig.SoftwareAsmux {
|
||||
urlPath := intent.BuildClientURL("unstable", "com.beeper.asmux", "dms")
|
||||
_, err = intent.MakeFullRequest(mautrix.FullRequest{
|
||||
Method: method,
|
||||
|
|
Loading…
Reference in a new issue