Class AccountDataService
Inheritance
AccountDataService
Assembly: Uniform.Matrix.Server.dll
public sealed class AccountDataService
Constructors
|
Edit this page
View Source
AccountDataService(IDbContextFactory<ServerDbContext>, ServerStream)
Declaration
public AccountDataService(IDbContextFactory<ServerDbContext> contexts, ServerStream stream)
Parameters
Fields
|
Edit this page
View Source
Room account data type of the fully read marker.
Declaration
public const string FullyReadType = "m.fully_read"
Field Value
|
Edit this page
View Source
Room account data type of room tags.
Declaration
public const string TagType = "m.tag"
Field Value
Methods
|
Edit this page
View Source
Remove a tag of a room; removing a missing tag does nothing.
Declaration
public Task DeleteTagAsync(string userId, string roomId, string tag, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return account data content; throw M_NOT_FOUND when not set.
Declaration
public Task<JsonObject> GetAsync(string userId, string? roomId, string type, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return the room's tags, e.g. {"m.favourite":{"order":0.5}}.
Declaration
public Task<JsonObject> GetTagsAsync(string userId, string roomId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
SetAsync(string, string?, string, JsonObject, CancellationToken)
Set account data; roomId is null for global data.
Declaration
public Task SetAsync(string userId, string? roomId, string type, JsonObject content, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
SetFromClientAsync(string, string?, string, JsonObject, CancellationToken)
Set account data from a client; roomId is null for global data. Throws M_BAD_JSON for types the server controls.
Declaration
public Task SetFromClientAsync(string userId, string? roomId, string type, JsonObject content, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
SetTagAsync(string, string, string, JsonObject, CancellationToken)
Add or replace a tag of a room; info holds its optional order.
Declaration
public Task SetTagAsync(string userId, string roomId, string tag, JsonObject info, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return account data content, or null when not set; roomId is null for global data.
Declaration
public Task<JsonObject?> TryGetAsync(string userId, string? roomId, string type, CancellationToken cancellationToken)
Parameters
Returns