Skip to content

Commit

Permalink
Disable encryption for local bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
smweber committed Jul 22, 2024
1 parent 5027cb5 commit bd5ffae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/connector/msgconvproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package connector

import (
"context"
"strings"

"google.golang.org/protobuf/proto"
"maunium.net/go/mautrix/bridgev2"
Expand Down Expand Up @@ -108,7 +109,8 @@ func (mpm *msgconvPortalMethods) GetData(ctx context.Context) *legacydb.Portal {
AvatarSet: portal.AvatarSet,
TopicSet: portal.TopicSet,
Revision: portal.Metadata.(*PortalMetadata).Revision,
Encrypted: true,
// Hack to prevent encryption while using the bridge as a "local bridge"
Encrypted: strings.HasSuffix(portal.Bridge.Matrix.ServerName(), ".localhost"),
//RelayUserID: portal.Relay.UserMXID,
ExpirationTime: uint32(portal.Disappear.Timer.Seconds()),
}
Expand Down

0 comments on commit bd5ffae

Please sign in to comment.