mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Backport support for fallback keys
This commit is contained in:
parent
23e097c3f0
commit
b302ef01cb
13 changed files with 446 additions and 20 deletions
|
@ -170,6 +170,13 @@ type DeviceKeys interface {
|
|||
DeleteAllDeviceKeys(ctx context.Context, txn *sql.Tx, userID string) error
|
||||
}
|
||||
|
||||
type FallbackKeys interface {
|
||||
SelectUnusedFallbackKeyAlgorithms(ctx context.Context, userID, deviceID string) ([]string, error)
|
||||
InsertFallbackKeys(ctx context.Context, txn *sql.Tx, keys api.FallbackKeys) ([]string, error)
|
||||
DeleteFallbackKeys(ctx context.Context, txn *sql.Tx, userID, deviceID string) error
|
||||
SelectAndUpdateFallbackKey(ctx context.Context, txn *sql.Tx, userID, deviceID, algorithm string) (map[string]json.RawMessage, error)
|
||||
}
|
||||
|
||||
type KeyChanges interface {
|
||||
InsertKeyChange(ctx context.Context, userID string) (int64, error)
|
||||
// SelectKeyChanges returns the set (de-duplicated) of users who have changed their keys between the two offsets.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue