diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-11 15:18:02 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-11 15:18:02 +0200 |
commit | b475ba5cf146114a820b464e901b5129b2abfe84 (patch) | |
tree | a7855482df8f6cb602834bfbac256b3443d0fae5 /LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs | |
parent | Set timeout for command listener (diff) | |
download | LibMatrix-b475ba5cf146114a820b464e901b5129b2abfe84.tar.xz |
Fix bug with event sending, make initial sync detection deterministic
Diffstat (limited to 'LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs')
-rw-r--r-- | LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs index f6c530d..c78b799 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs @@ -39,7 +39,8 @@ public class AuthenticatedHomeserverGeneric(string baseUrl, string accessToken) public WhoAmIResponse? WhoAmI { get; set; } - public string UserId => WhoAmI.UserId; + public string? UserId => WhoAmI?.UserId; + public string? UserLocalpart => UserId?.Split(":")[0][1..]; // public virtual async Task<WhoAmIResponse> WhoAmI() { // if (_whoAmI is not null) return _whoAmI; |