From 3558ba25896876b0c546f4c2decbb0671187745b Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 14 Nov 2025 10:48:26 +0100 Subject: StateEvent -> MatrixEvent --- .../LibMatrix.HomeserverEmulator/Extensions/EventExtensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Utilities/LibMatrix.HomeserverEmulator/Extensions/EventExtensions.cs') diff --git a/Utilities/LibMatrix.HomeserverEmulator/Extensions/EventExtensions.cs b/Utilities/LibMatrix.HomeserverEmulator/Extensions/EventExtensions.cs index d938b1b..15e41d4 100644 --- a/Utilities/LibMatrix.HomeserverEmulator/Extensions/EventExtensions.cs +++ b/Utilities/LibMatrix.HomeserverEmulator/Extensions/EventExtensions.cs @@ -3,8 +3,8 @@ using LibMatrix.HomeserverEmulator.Services; namespace LibMatrix.HomeserverEmulator.Extensions; public static class EventExtensions { - public static StateEventResponse ToStateEvent(this StateEvent stateEvent, UserStore.User user, RoomStore.Room room) { - return new StateEventResponse { + public static MatrixEventResponse ToStateEvent(this StateEvent stateEvent, UserStore.User user, RoomStore.Room room) { + return new MatrixEventResponse { RawContent = stateEvent.RawContent, EventId = "$" + string.Join("", Random.Shared.GetItems("abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVWXYZ0123456789".ToCharArray(), 100)), RoomId = room.RoomId, @@ -15,7 +15,7 @@ public static class EventExtensions { }; } - public static List GetCalculatedState(this IEnumerable events) { + public static List GetCalculatedState(this IEnumerable events) { return events.Where(s => s.StateKey != null) .OrderByDescending(s => s.OriginServerTs) .DistinctBy(x => (x.Type, x.StateKey)) -- cgit 1.5.1