mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 22:35:52 +01:00
Add method to load devices of specific user from server
This commit is contained in:
parent
6de2dd9242
commit
fab44b8317
1 changed files with 4 additions and 0 deletions
|
|
@ -23,6 +23,10 @@ var (
|
|||
InvalidKeySignature = errors.New("invalid signature on device keys")
|
||||
)
|
||||
|
||||
func (mach *OlmMachine) LoadDevices(user id.UserID) map[id.DeviceID]*DeviceIdentity {
|
||||
return mach.fetchKeys([]id.UserID{user}, "", true)[user]
|
||||
}
|
||||
|
||||
func (mach *OlmMachine) fetchKeys(users []id.UserID, sinceToken string, includeUntracked bool) (data map[id.UserID]map[id.DeviceID]*DeviceIdentity) {
|
||||
req := &mautrix.ReqQueryKeys{
|
||||
DeviceKeys: mautrix.DeviceKeysRequest{},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue