diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-06-13 14:19:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 14:19:31 +0200 |
commit | 2c87972a3a84be400e5c69e2e5a727f21b4e457e (patch) | |
tree | 84aa12173063ff523b8df2675a17f7b2716c1c5b /roomserver/api | |
parent | 82b73a49068771168ed52351f7be3b033692be4a (diff) |
Create user room key if needed (#3108)
Diffstat (limited to 'roomserver/api')
-rw-r--r-- | roomserver/api/api.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roomserver/api/api.go b/roomserver/api/api.go index bafde91c..fec28841 100644 --- a/roomserver/api/api.go +++ b/roomserver/api/api.go @@ -2,6 +2,7 @@ package api import ( "context" + "crypto/ed25519" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" @@ -66,6 +67,9 @@ type RoomserverInternalAPI interface { req *QueryAuthChainRequest, res *QueryAuthChainResponse, ) error + + // GetOrCreateUserRoomPrivateKey gets the user room key for the specified user. If no key exists yet, a new one is created. + GetOrCreateUserRoomPrivateKey(ctx context.Context, userID spec.UserID, roomID spec.RoomID) (ed25519.PrivateKey, error) } type InputRoomEventsAPI interface { |