mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Send device list updates to servers (outbound only) (#1237)
* Add QueryDeviceMessages to serve up device keys and stream IDs * Consume key change events in fedsender Don't yet send them to destinations as we haven't worked them out yet * Send device list updates to all required servers * Glue it all together
This commit is contained in:
parent
fb56bbf0b7
commit
0c4e8f6d4f
22 changed files with 328 additions and 50 deletions
|
@ -32,6 +32,7 @@ type KeyInternalAPI interface {
|
|||
QueryKeys(ctx context.Context, req *QueryKeysRequest, res *QueryKeysResponse)
|
||||
QueryKeyChanges(ctx context.Context, req *QueryKeyChangesRequest, res *QueryKeyChangesResponse)
|
||||
QueryOneTimeKeys(ctx context.Context, req *QueryOneTimeKeysRequest, res *QueryOneTimeKeysResponse)
|
||||
QueryDeviceMessages(ctx context.Context, req *QueryDeviceMessagesRequest, res *QueryDeviceMessagesResponse)
|
||||
}
|
||||
|
||||
// KeyError is returned if there was a problem performing/querying the server
|
||||
|
@ -188,3 +189,14 @@ type QueryOneTimeKeysResponse struct {
|
|||
Count OneTimeKeysCount
|
||||
Error *KeyError
|
||||
}
|
||||
|
||||
type QueryDeviceMessagesRequest struct {
|
||||
UserID string
|
||||
}
|
||||
|
||||
type QueryDeviceMessagesResponse struct {
|
||||
// The latest stream ID
|
||||
StreamID int
|
||||
Devices []DeviceMessage
|
||||
Error *KeyError
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue