matrix: working E2EE, on by default

mautrix-go now include a cryptohelper package, which solves all my
issues and just works. the setting is now on by default, however
packages are not yet built with it.
This commit is contained in:
Harvey Tindall
2024-08-10 19:30:14 +01:00
parent 86c7551ff8
commit 69569e556a
13 changed files with 116 additions and 273 deletions

View File

@@ -1,12 +1,9 @@
//go:build !e2ee
// +build !e2ee
package main
import (
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
)
import "maunium.net/go/mautrix/id"
type Crypto struct{}
@@ -17,19 +14,4 @@ func InitMatrixCrypto(d *MatrixDaemon) (err error) {
return
}
func HandleSyncerCrypto(startTime int64, d *MatrixDaemon, syncer *mautrix.DefaultSyncer) {
return
}
func CryptoShutdown(d *MatrixDaemon) {
return
}
func EncryptRoom(d *MatrixDaemon, room *mautrix.RespCreateRoom, userID id.UserID) (encrypted bool) {
return
}
func SendEncrypted(d *MatrixDaemon, content *event.MessageEventContent, roomID id.RoomID) (err error) {
err = d.send(content, roomID)
return
}
func EncryptRoom(d *MatrixDaemon, roomID id.RoomID) error { return nil }