diff options
Diffstat (limited to 'MxApiExtensions')
-rw-r--r-- | MxApiExtensions/Controllers/Client/Room/RoomsSendMessageController.cs | 2 | ||||
-rw-r--r-- | MxApiExtensions/Controllers/Client/SyncController.cs | 3 | ||||
-rw-r--r-- | MxApiExtensions/MxApiExtensions.csproj | 6 |
3 files changed, 5 insertions, 6 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 diff --git a/MxApiExtensions/MxApiExtensions.csproj b/MxApiExtensions/MxApiExtensions.csproj index a7c1d40..7fc41ad 100644 --- a/MxApiExtensions/MxApiExtensions.csproj +++ b/MxApiExtensions/MxApiExtensions.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <InvariantGlobalization>true</InvariantGlobalization> @@ -10,8 +10,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" /> - <PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" /> + <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" /> + <PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" /> </ItemGroup> <ItemGroup> |