Class ServerNotices
Server notices: messages from the server to a local user, in a room of their own tagged m.server_notice, where only the notices account may write.
Inherited Members
Namespace: Uniform.Matrix.Server.Accounts
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed class ServerNotices
Constructors
| Edit this page View SourceServerNotices(IDbContextFactory<ServerDbContext>, AccountService, AccountDataService, RoomService, IOptionsMonitor<ServerOptions>, ILogger<ServerNotices>)
Create the service.
Declaration
public ServerNotices(IDbContextFactory<ServerDbContext> contexts, AccountService accounts, AccountDataService accountData, RoomService rooms, IOptionsMonitor<ServerOptions> options, ILogger<ServerNotices> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| IDbContextFactory<ServerDbContext> | contexts | |
| AccountService | accounts | |
| AccountDataService | accountData | |
| RoomService | rooms | |
| IOptionsMonitor<ServerOptions> | options | |
| ILogger<ServerNotices> | logger |
Properties
| Edit this page View SourceSenderId
User ID of the notices account.
Declaration
public string SenderId { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceSendAsync(string, JsonObject, CancellationToken)
Send a notice to a local user, in their notices room, made and tagged for them on the first notice; return the event ID.
Declaration
public Task<string> SendAsync(string userId, JsonObject content, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userId | Local user who gets the notice. |
| JsonObject | content | Message content; |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<string> |