diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-15 09:51:56 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-15 09:51:56 +0200 |
commit | 143b7fb859d97e815ed5340a1889db93e17a762e (patch) | |
tree | 91c536b15a1d60486345ebd4829bfd67e7be8018 /MxApiExtensions/Controllers/SyncController.cs | |
parent | Added a lot of utilities (diff) | |
download | MxApiExtensions-143b7fb859d97e815ed5340a1889db93e17a762e.tar.xz |
Refactors
Diffstat (limited to 'MxApiExtensions/Controllers/SyncController.cs')
-rw-r--r-- | MxApiExtensions/Controllers/SyncController.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MxApiExtensions/Controllers/SyncController.cs b/MxApiExtensions/Controllers/SyncController.cs index 382d670..2bc47c1 100644 --- a/MxApiExtensions/Controllers/SyncController.cs +++ b/MxApiExtensions/Controllers/SyncController.cs @@ -12,6 +12,7 @@ using LibMatrix.RoomTypes; using LibMatrix.StateEventTypes.Spec; using Microsoft.AspNetCore.Mvc; using MxApiExtensions.Classes; +using MxApiExtensions.Classes.LibMatrix; using MxApiExtensions.Extensions; using MxApiExtensions.Services; @@ -201,7 +202,7 @@ public class SyncController : ControllerBase { Join = new() { { room.RoomId, - new SyncResult.RoomsDataStructure.JoinedRoomDataStructure() { + new SyncResult.RoomsDataStructure.JoinedRoomDataStructure { AccountData = new() { Events = new() }, @@ -246,7 +247,7 @@ public class SyncController : ControllerBase { .Where(x => x.Type == "m.room.member" && x.StateKey != syncState.Homeserver.WhoAmI.UserId - && (x.TypedContent as RoomMemberEventData).Membership == "join" + && (x.TypedContent as RoomMemberEventContent).Membership == "join" ) .Select(x => x.StateKey)); joinRoom.Summary.JoinedMemberCount = joinRoom.Summary.Heroes.Count; @@ -256,8 +257,8 @@ public class SyncController : ControllerBase { } private async Task<StateEventResponse> GetStatusMessage(SyncState syncState, string message) { - return new StateEventResponse() { - TypedContent = new PresenceStateEventData() { + return new StateEventResponse { + TypedContent = new PresenceEventContent { DisplayName = "MxApiExtensions", Presence = "online", StatusMessage = message, |