Class ProfileService
Profiles: display name and avatar of local users, and of other servers' users through federation.
Inheritance
ProfileService
Assembly: Uniform.Matrix.Server.dll
public sealed class ProfileService
Constructors
|
Edit this page
View Source
ProfileService(IDbContextFactory<ServerDbContext>, RoomService, FederationClient, IOptionsMonitor<ServerOptions>)
Declaration
public ProfileService(IDbContextFactory<ServerDbContext> contexts, RoomService rooms, FederationClient federation, IOptionsMonitor<ServerOptions> server)
Parameters
Fields
|
Edit this page
View Source
Profile field of the avatar.
Declaration
public const string AvatarUrl = "avatar_url"
Field Value
|
Edit this page
View Source
Profile field of the display name.
Declaration
public const string DisplayName = "displayname"
Field Value
Methods
|
Edit this page
View Source
Return one field of a profile; throw M_NOT_FOUND when it is not set.
Declaration
public Task<JsonObject> GetFieldAsync(string userId, string field, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return the profile of a user, with unset fields left out; throw M_NOT_FOUND for unknown users. Users of other servers are asked from their server.
Declaration
public Task<JsonObject> GetProfileAsync(string userId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Set or clear (value null or empty) the requester's display name or avatar, then update their rooms.
Declaration
public Task SetFieldAsync(string userId, string field, string? value, CancellationToken cancellationToken)
Parameters
Returns