Class RoomHistory
Room history for other servers, which fill gaps with it before they can show new events: missing events, backfill, single events and the state at an event.
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed class RoomHistory
Constructors
|
Edit this page
View Source
RoomHistory(IDbContextFactory<ServerDbContext>, RoomAcls)
Declaration
public RoomHistory(IDbContextFactory<ServerDbContext> contexts, RoomAcls acls)
Parameters
Methods
|
Edit this page
View Source
BackfillAsync(string, string, IReadOnlyCollection<string>, int, CancellationToken)
Return from and the events before them, at most limit, newest first, as backfill answers.
Declaration
public Task<JsonArray> BackfillAsync(string origin, string roomId, IReadOnlyCollection<string> from, int limit, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
GetEventAsync(string, string, CancellationToken)
Return one event of a room the asking server is in.
Declaration
public Task<JsonObject> GetEventAsync(string origin, string eventId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
GetMissingEventsAsync(string, string, IReadOnlyCollection<string>, IReadOnlyCollection<string>, int, long, CancellationToken)
Return the events before latest back to earliest, which the asking server has, at most limit, oldest first.
Declaration
public Task<JsonArray> GetMissingEventsAsync(string origin, string roomId, IReadOnlyCollection<string> earliest, IReadOnlyCollection<string> latest, int limit, long minDepth, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
GetStateAsync(string, string, string, CancellationToken)
Return the state of a room at an event, that is before it as other servers expect, and the auth chain of that state, as IDs or as events.
Declaration
public Task<(List<JsonObject> State, List<JsonObject> AuthChain, List<string> StateIds, List<string> AuthChainIds)> GetStateAsync(string origin, string roomId, string eventId, CancellationToken cancellationToken)
Parameters
Returns