From a9dff6da7391297b64bb5be473b76c3c590f34a1 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 29 Apr 2020 02:45:54 +0300 Subject: Add support for encrypted files --- interface/matrix.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'interface') diff --git a/interface/matrix.go b/interface/matrix.go index 7895957..f4f46ef 100644 --- a/interface/matrix.go +++ b/interface/matrix.go @@ -18,6 +18,7 @@ package ifc import ( "maunium.net/go/mautrix" + "maunium.net/go/mautrix/crypto/attachment" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" @@ -59,8 +60,8 @@ type MatrixContainer interface { GetRoom(roomID id.RoomID) *rooms.Room GetOrCreateRoom(roomID id.RoomID) *rooms.Room - Download(uri id.ContentURI) ([]byte, error) - DownloadToDisk(uri id.ContentURI, target string) (string, error) + Download(uri id.ContentURI, file *attachment.EncryptedFile) ([]byte, error) + DownloadToDisk(uri id.ContentURI, file *attachment.EncryptedFile, target string) (string, error) GetDownloadURL(uri id.ContentURI) string GetCachePath(uri id.ContentURI) string } -- cgit v1.2.3