about summary refs log tree commit diff
path: root/LibMatrix/Homeservers
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-11 15:18:02 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-11 15:18:02 +0200
commitb475ba5cf146114a820b464e901b5129b2abfe84 (patch)
treea7855482df8f6cb602834bfbac256b3443d0fae5 /LibMatrix/Homeservers
parentSet timeout for command listener (diff)
downloadLibMatrix-b475ba5cf146114a820b464e901b5129b2abfe84.tar.xz
Fix bug with event sending, make initial sync detection deterministic
Diffstat (limited to 'LibMatrix/Homeservers')
-rw-r--r--LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs3
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;