From ee3594db46fe261962f0a8a11c48cb9d6f84938f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 25 Jul 2020 20:54:32 +0300 Subject: Add toggle to only send to verified devices --- matrix/crypto.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'matrix') 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") -- cgit v1.2.3