From b475ba5cf146114a820b464e901b5129b2abfe84 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Wed, 11 Oct 2023 15:18:02 +0200 Subject: Fix bug with event sending, make initial sync detection deterministic --- LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'LibMatrix/Homeservers') 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 WhoAmI() { // if (_whoAmI is not null) return _whoAmI; -- cgit 1.4.1