aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-07-25 20:54:32 +0300
committerTulir Asokan <tulir@maunium.net>2020-07-25 20:54:32 +0300
commitee3594db46fe261962f0a8a11c48cb9d6f84938f (patch)
treec12fc510597f33b82e17f630a00a3afb1e7849ab /matrix
parentead7e0bf1d9c584224c1738b32ad26e314957220 (diff)
Add toggle to only send to verified devices
Diffstat (limited to 'matrix')
-rw-r--r--matrix/crypto.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/matrix/crypto.go b/matrix/crypto.go
index 158a1f2..c549e8a 100644
--- a/matrix/crypto.go
+++ b/matrix/crypto.go
@@ -55,7 +55,9 @@ func (c *Container) initCrypto() error {
if err != nil {
return errors.Wrap(err, "failed to open crypto store")
}
- c.crypto = crypto.NewOlmMachine(c.client, cryptoLogger{}, cryptoStore, c.config.Rooms)
+ crypt := crypto.NewOlmMachine(c.client, cryptoLogger{}, cryptoStore, c.config.Rooms)
+ crypt.AllowUnverifiedDevices = !c.config.SendToVerifiedOnly
+ c.crypto = crypt
err = c.crypto.Load()
if err != nil {
return errors.Wrap(err, "failed to create olm machine")