mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Merge SenderID & Per Room User Key work (#3109)
This commit is contained in:
parent
7a2e325d10
commit
e4665979bf
75 changed files with 801 additions and 379 deletions
|
@ -51,6 +51,7 @@ type RoomserverInternalAPI interface {
|
|||
UserRoomserverAPI
|
||||
FederationRoomserverAPI
|
||||
QuerySenderIDAPI
|
||||
UserRoomPrivateKeyCreator
|
||||
|
||||
// needed to avoid chicken and egg scenario when setting up the
|
||||
// interdependencies between the roomserver and other input APIs
|
||||
|
@ -67,7 +68,9 @@ type RoomserverInternalAPI interface {
|
|||
req *QueryAuthChainRequest,
|
||||
res *QueryAuthChainResponse,
|
||||
) error
|
||||
}
|
||||
|
||||
type UserRoomPrivateKeyCreator interface {
|
||||
// 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)
|
||||
}
|
||||
|
@ -81,8 +84,8 @@ type InputRoomEventsAPI interface {
|
|||
}
|
||||
|
||||
type QuerySenderIDAPI interface {
|
||||
QuerySenderIDForUser(ctx context.Context, roomID string, userID spec.UserID) (spec.SenderID, error)
|
||||
QueryUserIDForSender(ctx context.Context, roomID string, senderID spec.SenderID) (*spec.UserID, error)
|
||||
QuerySenderIDForUser(ctx context.Context, roomID spec.RoomID, userID spec.UserID) (spec.SenderID, error)
|
||||
QueryUserIDForSender(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (*spec.UserID, error)
|
||||
}
|
||||
|
||||
// Query the latest events and state for a room from the room server.
|
||||
|
@ -228,6 +231,7 @@ type FederationRoomserverAPI interface {
|
|||
QueryLatestEventsAndStateAPI
|
||||
QueryBulkStateContentAPI
|
||||
QuerySenderIDAPI
|
||||
UserRoomPrivateKeyCreator
|
||||
|
||||
// QueryServerBannedFromRoom returns whether a server is banned from a room by server ACLs.
|
||||
QueryServerBannedFromRoom(ctx context.Context, req *QueryServerBannedFromRoomRequest, res *QueryServerBannedFromRoomResponse) error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue