From 3558ba25896876b0c546f4c2decbb0671187745b Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 14 Nov 2025 10:48:26 +0100 Subject: StateEvent -> MatrixEvent --- LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'LibMatrix/Helpers/SyncProcessors') diff --git a/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs b/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs index be8aa8d..c887f6e 100644 --- a/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs +++ b/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs @@ -8,11 +8,11 @@ using Microsoft.Extensions.Logging; namespace LibMatrix.Helpers.SyncProcessors; public class Msc4222EmulationSyncProcessor(AuthenticatedHomeserverGeneric homeserver, ILogger? logger) { - private static bool StateEventsMatch(StateEventResponse a, StateEventResponse b) { + private static bool StateEventsMatch(MatrixEventResponse a, MatrixEventResponse b) { return a.Type == b.Type && a.StateKey == b.StateKey; } - private static bool StateEventIsNewer(StateEventResponse a, StateEventResponse b) { + private static bool StateEventIsNewer(MatrixEventResponse a, MatrixEventResponse b) { return StateEventsMatch(a, b) && a.OriginServerTs < b.OriginServerTs; } @@ -76,7 +76,7 @@ public class Msc4222EmulationSyncProcessor(AuthenticatedHomeserverGeneric homese Events = [] }; - var oldState = new List(); + var oldState = new List(); if (data.State is { Events.Count: > 0 }) { oldState.ReplaceBy(data.State.Events, StateEventIsNewer); } @@ -160,7 +160,7 @@ public class Msc4222EmulationSyncProcessor(AuthenticatedHomeserverGeneric homese logger?.LogWarning("Msc4222Emulation: Failed to get full state for room {roomId}, state may be incomplete!\n{exception}", roomId, e); } - var oldState = new List(); + var oldState = new List(); if (data.State is { Events.Count: > 0 }) { oldState.ReplaceBy(data.State.Events, StateEventIsNewer); } -- cgit 1.5.1