aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-05-07 11:56:21 +0300
committerTulir Asokan <tulir@maunium.net>2020-05-07 11:56:21 +0300
commite1b38bb20268a755ce63efb3e8894f983eedc02e (patch)
tree53afb7354ac1417a8d79fd14d723131c52427c8a /matrix
parent2b07b80e64e0c1ebe1673a5a534398f1fb8ad086 (diff)
Add command to get e2ee fingerprint
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 7918aeb..e9a4f79 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -55,7 +55,7 @@ import (
// It is used for all Matrix calls from the UI and Matrix event handlers.
type Container struct {
client *mautrix.Client
- crypto CryptoInterface
+ crypto ifc.Crypto
syncer *GomuksSyncer
gmx ifc.Gomuks
ui ifc.GomuksUI
@@ -89,14 +89,8 @@ func (log mxLogger) Debugfln(message string, args ...interface{}) {
debug.Printf("[Matrix] "+message, args...)
}
-type CryptoInterface interface {
- Load() error
- FlushStore() error
- ProcessSyncResponse(resp *mautrix.RespSync, since string)
- HandleMemberEvent(*event.Event)
- DecryptMegolmEvent(*event.Event) (*event.Event, error)
- EncryptMegolmEvent(id.RoomID, event.Type, event.Content) (*event.EncryptedEventContent, error)
- ShareGroupSession(id.RoomID, []id.UserID) error
+func (c *Container) Crypto() ifc.Crypto {
+ return c.crypto
}
// InitClient initializes the mautrix client and connects to the homeserver specified in the config.