diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-23 08:54:11 +0100 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-23 08:54:11 +0100 |
commit | 14bcb748a853f7cd2afce40477bd2b0cb14ad7e6 (patch) | |
tree | 16dc78593288d715c93b5aee2903318c15a3e201 /LibMatrix/Homeservers | |
parent | Cleanup (diff) | |
download | LibMatrix-14bcb748a853f7cd2afce40477bd2b0cb14ad7e6.tar.xz |
User impersonation support (appservice identity assertion), non-AsyncEnumerable room member lookup
Diffstat (limited to '')
-rw-r--r-- | LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs index cf85287..73cd641 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs @@ -307,4 +307,9 @@ public class AuthenticatedHomeserverGeneric(string serverName, string accessToke } #endregion + + public async Task SetImpersonate(string mxid) { + ClientHttpClient.AdditionalQueryParameters["user_id"] = mxid; + WhoAmI = await ClientHttpClient.GetFromJsonAsync<WhoAmIResponse>("/_matrix/client/v3/account/whoami"); + } } |