aboutsummaryrefslogtreecommitdiff
path: root/matrix/crypto.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-07-30 14:34:49 +0300
committerTulir Asokan <tulir@maunium.net>2020-07-30 14:34:49 +0300
commit0d12947b1f70745d8023c89e22432f2a1353dfbb (patch)
tree048d98d1484851caaffc3c5463619442d8fee734 /matrix/crypto.go
parentecdd4f08cb262c8f0c988209e6296c068e1d4cf3 (diff)
parent2f5f0674b600f129204958c810843d998f6a2f6a (diff)
Merge branch 'verification'
Fixes #160 Fixes #161
Diffstat (limited to 'matrix/crypto.go')
-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")