Class StateResolution
State resolution v2, and its v2.1 form in room version 12: the room's state where the room's history has forks, from the states of each branch.
Inherited Members
Namespace: Uniform.Matrix.Protocol.Server
Assembly: Uniform.Matrix.Protocol.Server.dll
Syntax
public static class StateResolution
Remarks
Conflicted power events (power levels, join rules, kicks and bans) are applied first, in an order that favours senders with more power; the other conflicted events follow, ordered by the power level events they were sent under. Every event is checked with AuthRules against what has been resolved so far, so events that lose their authorization drop out.
Methods
| Edit this page View SourceResolve(RoomVersion, IReadOnlyList<IReadOnlyDictionary<(string Type, string StateKey), string>>, IReadOnlyDictionary<string, JsonObject>)
Return the state of stateSets merged.
Declaration
public static Dictionary<(string Type, string StateKey), string> Resolve(RoomVersion version, IReadOnlyList<IReadOnlyDictionary<(string Type, string StateKey), string>> stateSets, IReadOnlyDictionary<string, JsonObject> events)
Parameters
| Type | Name | Description |
|---|---|---|
| RoomVersion | version | Room version. |
| IReadOnlyList<IReadOnlyDictionary<(string Type, string StateKey), string>> | stateSets | State of each branch: event IDs by type and state key. |
| IReadOnlyDictionary<string, JsonObject> | events | Events by ID: those of the state sets and their auth chains; missing ones are left out. |
Returns
| Type | Description |
|---|---|
| Dictionary<(string Type, string StateKey), string> |