Class RemoteJoins
Joining rooms of other servers: make_join for a template, sign it, send_join, check the returned state and store the room.
Inherited Members
Namespace: Uniform.Matrix.Server.Federation
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed class RemoteJoins
Remarks
Received events are checked for their content hash, their sender server's signature, and the auth rules against their own auth events; those that fail are dropped.
Constructors
| Edit this page View SourceRemoteJoins(FederationClient, RemoteServerKeys, ServerKeys, EventSender, IOptionsMonitor<ServerOptions>, IOptionsMonitor<FederationOptions>, ILogger<RemoteJoins>)
Create the service.
Declaration
public RemoteJoins(FederationClient federation, RemoteServerKeys remoteKeys, ServerKeys keys, EventSender sender, IOptionsMonitor<ServerOptions> server, IOptionsMonitor<FederationOptions> options, ILogger<RemoteJoins> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| FederationClient | federation | |
| RemoteServerKeys | remoteKeys | |
| ServerKeys | keys | |
| EventSender | sender | |
| IOptionsMonitor<ServerOptions> | server | |
| IOptionsMonitor<FederationOptions> | options | |
| ILogger<RemoteJoins> | logger |
Methods
| Edit this page View SourceJoinAsync(string, string, string, JsonObject, CancellationToken)
Join local user userId to roomId through resident, a server in the room.
Declaration
public Task JoinAsync(string userId, string roomId, string resident, JsonObject content, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userId | Local user. |
| string | roomId | Room on another server. |
| string | resident | Server to join through, e.g. the one in the room ID. |
| JsonObject | content | Member content, e.g. with the display name. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
RejectInviteAsync(string, string, string, string?, CancellationToken)
Reject an invite of local user userId to roomId, a room not here, through resident: make_leave, sign, send_leave.
Declaration
public Task RejectInviteAsync(string userId, string roomId, string resident, string? reason, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userId | |
| string | roomId | |
| string | resident | |
| string | reason | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
ResolveAliasAsync(string, string, CancellationToken)
Return the room of an alias of aliasServer and servers to join it through, asked from that server.
Declaration
public Task<(string RoomId, IReadOnlyList<string> Servers)> ResolveAliasAsync(string alias, string aliasServer, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | |
| string | aliasServer | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<(string RoomId, IReadOnlyList<string> Servers)> |