Create user room key if needed (#3108)

This commit is contained in:
Till 2023-06-13 14:19:31 +02:00 committed by GitHub
parent 82b73a4906
commit 2c87972a3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 2 deletions

View file

@ -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 {