Implement MSC3938

This commit is contained in:
Till Faelligen 2024-12-22 19:26:56 +01:00
parent add73ec866
commit 2561da6c72
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E
8 changed files with 25 additions and 78 deletions

View file

@ -73,9 +73,8 @@ type Database interface {
// Update the notary with the given server keys from the given server name.
UpdateNotaryKeys(ctx context.Context, serverName spec.ServerName, serverKeys gomatrixserverlib.ServerKeys) error
// Query the notary for the server keys for the given server. If `optKeyIDs` is not empty, multiple server keys may be returned (between 1 - len(optKeyIDs))
// such that the combination of all server keys will include all the `optKeyIDs`.
GetNotaryKeys(ctx context.Context, serverName spec.ServerName, optKeyIDs []gomatrixserverlib.KeyID) ([]gomatrixserverlib.ServerKeys, error)
// Query the notary for the server keys for the given server.
GetNotaryKeys(ctx context.Context, serverName spec.ServerName) ([]gomatrixserverlib.ServerKeys, error)
// DeleteExpiredEDUs cleans up expired EDUs
DeleteExpiredEDUs(ctx context.Context) error