diff options
author | Rory& <root@rory.gay> | 2024-11-16 03:34:00 +0100 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-11-16 03:34:00 +0100 |
commit | ec14ac1d3db8a9be10b94a98f408c087b1f7175c (patch) | |
tree | 1b11140090ad4d20ea0c4b41a95942d6c042b986 /MxApiExtensions/Controllers/Client | |
parent | Update dependencies (diff) | |
download | MxApiExtensions-master.tar.xz |
Update to .NET 9 HEAD github/master master
Diffstat (limited to 'MxApiExtensions/Controllers/Client')
-rw-r--r-- | MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs | 2 | ||||
-rw-r--r-- | MxApiExtensions/Controllers/Client/SyncController.cs | 3 |
2 files changed, 2 insertions, 3 deletions
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<LoginController> 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<SyncController> 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<SyncController> 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 |