From ec14ac1d3db8a9be10b94a98f408c087b1f7175c Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 16 Nov 2024 03:34:00 +0100 Subject: Update to .NET 9 --- MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs | 2 +- MxApiExtensions/Controllers/Client/SyncController.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'MxApiExtensions/Controllers') diff --git a/MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs b/MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs index 369e7cc..4bd631e 100644 --- a/MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs +++ b/MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs @@ -62,7 +62,7 @@ public class RoomsSendMessageController(ILogger logger, UserCon TypedContent = MessageFormatter.FormatSuccess("Thinking..."), OriginServerTs = DateTimeOffset.Now.ToUnixTimeMilliseconds(), Unsigned = new() { - Age = 1 + ["age"] = 1 }, RoomId = roomId, EventId = "$" + string.Join("", Random.Shared.GetItems("abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVWXYZ0123456789".ToCharArray(), 100)) diff --git a/MxApiExtensions/Controllers/Client/SyncController.cs b/MxApiExtensions/Controllers/Client/SyncController.cs index 6568d7e..3d88b77 100644 --- a/MxApiExtensions/Controllers/Client/SyncController.cs +++ b/MxApiExtensions/Controllers/Client/SyncController.cs @@ -222,7 +222,6 @@ public class SyncController(ILogger logger, MxApiExtensionsConfi if (dmRooms.Contains(x.RoomId)) return -1; var parts = x.RoomId.Split(':'); if (parts[1] == ownHs) return 200; - if (HomeserverWeightEstimation.EstimatedSize.ContainsKey(parts[1])) return HomeserverWeightEstimation.EstimatedSize[parts[1]] + parts[0].Length; return 5000; }).ToList(); @@ -246,7 +245,7 @@ public class SyncController(ILogger logger, MxApiExtensionsConfi // await _roomDataSemaphore.WaitAsync(); //get the room's state var roomState = room.GetFullStateAsync(); - //get the room's timeline, reversed + //get the room's timeline, reversed var timeline = await room.GetMessagesAsync(limit: 100, dir: "b"); timeline.Chunk.Reverse(); //queue up this data as a sync response -- cgit 1.4.1