2 files changed, 15 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs b/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs
index b6836c8..2c3b9ce 100644
--- a/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs
+++ b/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs
@@ -43,11 +43,11 @@ public class MRUStorageWrapper(TieredStorageService storageService, HomeserverPr
return null;
}
- return await homeserverProviderService.GetAuthenticatedWithToken(token.Homeserver, token.AccessToken);
+ return await homeserverProviderService.GetAuthenticatedWithToken(token.Homeserver, token.AccessToken, token.Proxy);
}
public async Task<AuthenticatedHomeserverGeneric?> GetSession(UserAuth userAuth) {
- return await homeserverProviderService.GetAuthenticatedWithToken(userAuth.Homeserver, userAuth.AccessToken);
+ return await homeserverProviderService.GetAuthenticatedWithToken(userAuth.Homeserver, userAuth.AccessToken, userAuth.Proxy);
}
public async Task<AuthenticatedHomeserverGeneric?> GetCurrentSessionOrNavigate() {
diff --git a/MatrixRoomUtils.Web/Classes/RoomInfo.cs b/MatrixRoomUtils.Web/Classes/RoomInfo.cs
index a2fa6f5..37973a0 100644
--- a/MatrixRoomUtils.Web/Classes/RoomInfo.cs
+++ b/MatrixRoomUtils.Web/Classes/RoomInfo.cs
@@ -25,7 +25,18 @@ public class RoomInfo : NotifyPropertyChanged {
@event.RawContent = await Room.GetStateAsync<JsonObject>(type, stateKey);
}
catch (MatrixException e) {
- if (e is { ErrorCode: "M_NOT_FOUND" }) @event.RawContent = default!;
+ if (e is { ErrorCode: "M_NOT_FOUND" }) {
+ if (type == "m.room.name")
+ @event = new() {
+ Type = type,
+ StateKey = stateKey,
+ TypedContent = new RoomNameEventContent() {
+ Name = await Room.GetNameOrFallbackAsync()
+ }
+ };
+ else
+ @event.RawContent = default!;
+ }
else throw;
}
@@ -60,7 +71,7 @@ public class RoomInfo : NotifyPropertyChanged {
private string? _roomName;
private RoomCreateEventContent? _creationEventContent;
private string? _roomCreator;
-
+
public string? DefaultRoomName { get; set; }
public RoomInfo() {
|