Class Room
Client-side state of one room, kept up to date by RoomStore; not thread-safe.
Namespace: Uniform.Matrix.Client.State
Assembly: Uniform.Matrix.Client.dll
Properties
|
Edit this page
View Source
Room account data keyed by type.
Declaration
public IReadOnlyDictionary<string, MatrixEvent> AccountData { get; }
Property Value
|
Edit this page
View Source
Avatar mxc:// URI: the room's own from RoomAvatar, or the other person's in a direct chat; null when none.
Declaration
public string? AvatarUrl { get; }
Property Value
|
Edit this page
View Source
Declaration
public string? CanonicalAlias { get; }
Property Value
|
Edit this page
View Source
Creators with unlimited power, from room version 12: the create event's sender and its additional creators; empty in older rooms.
Declaration
public IReadOnlyCollection<string> Creators { get; }
Property Value
|
Edit this page
View Source
Other user of a direct-message room per Direct; null for other rooms.
Declaration
public string? DirectUserId { get; }
Property Value
|
Edit this page
View Source
Name to show for the room, computed per spec: name, alias, then member names.
Declaration
public string DisplayName { get; }
Property Value
|
Edit this page
View Source
Event up to which the user has read everything, from FullyRead.
Declaration
public string? FullyReadEventId { get; }
Property Value
|
Edit this page
View Source
HasMoreHistory
Whether older history may exist beyond Timeline.
Declaration
public bool HasMoreHistory { get; }
Property Value
|
Edit this page
View Source
Declaration
public IReadOnlyList<string>? Heroes { get; }
Property Value
|
Edit this page
View Source
Unread highlights such as mentions per server.
Declaration
public int HighlightCount { get; }
Property Value
|
Edit this page
View Source
HistoryToken
Token for loading events older than Timeline; null when not known yet or history is exhausted.
Declaration
public string? HistoryToken { get; }
Property Value
|
Edit this page
View Source
Invited members per summary, or counted from known members.
Declaration
public int InvitedMemberCount { get; }
Property Value
|
Edit this page
View Source
Users who invited us, i.e. sender of our invite; null unless invited.
Declaration
public string? InviterUserId { get; }
Property Value
|
Edit this page
View Source
Whether this is a direct-message room, including direct invites.
Declaration
public bool IsDirect { get; }
Property Value
|
Edit this page
View Source
Whether the room is end-to-end encrypted; such messages arrive as RoomEncrypted.
Declaration
public bool IsEncrypted { get; }
Property Value
|
Edit this page
View Source
Joined members per summary, or counted from known members.
Declaration
public int JoinedMemberCount { get; }
Property Value
|
Edit this page
View Source
Declaration
public IReadOnlyDictionary<string, RoomMemberInfo> Members { get; }
Property Value
|
Edit this page
View Source
Declaration
public string Membership { get; }
Property Value
|
Edit this page
View Source
Declaration
public string? Name { get; }
Property Value
|
Edit this page
View Source
Unread notifying messages per server.
Declaration
public int NotificationCount { get; }
Property Value
|
Edit this page
View Source
Declaration
public PowerLevelsContent? PowerLevels { get; }
Property Value
|
Edit this page
View Source
Latest read receipt event ID per user.
Declaration
public IReadOnlyDictionary<string, string> ReadReceipts { get; }
Property Value
|
Edit this page
View Source
Declaration
public string RoomId { get; }
Property Value
|
Edit this page
View Source
Declaration
public IReadOnlyDictionary<string, TagInfo> Tags { get; }
Property Value
|
Edit this page
View Source
Recent events in chronological order, at most MaxTimelineLength plus backfilled ones.
Declaration
public IReadOnlyList<ClientEvent> Timeline { get; }
Property Value
|
Edit this page
View Source
Declaration
public string? Topic { get; }
Property Value
|
Edit this page
View Source
Declaration
public IReadOnlyList<string> TypingUserIds { get; }
Property Value
Methods
|
Edit this page
View Source
GetAccountDataContent<T>(string)
Return the content of room account data as T, or null.
Declaration
public T? GetAccountDataContent<T>(string type) where T : class
Parameters
| Type |
Name |
Description |
| string |
type |
|
Returns
Type Parameters
|
Edit this page
View Source
Name to show for userId per spec: display name, with the user ID appended when another member shares it.
Declaration
public string GetMemberDisplayName(string userId)
Parameters
| Type |
Name |
Description |
| string |
userId |
|
Returns
|
Edit this page
View Source
Return the power level of userId: Creator for Creators; without power levels, 100 for the room's creator and 0 for others.
Declaration
public long GetPowerLevel(string userId)
Parameters
| Type |
Name |
Description |
| string |
userId |
|
Returns
|
Edit this page
View Source
Return the current state event of type and stateKey, or null.
Declaration
public MatrixEvent? GetState(string type, string stateKey = "")
Parameters
Returns
|
Edit this page
View Source
GetStateContent<T>(string, string)
Return the content of a state event as T, or null when unset or malformed.
Declaration
public T? GetStateContent<T>(string type, string stateKey = "") where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Return current state events of type keyed by state key.
Declaration
public IReadOnlyDictionary<string, MatrixEvent> GetStates(string type)
Parameters
| Type |
Name |
Description |
| string |
type |
|
Returns
|
Edit this page
View Source
Return a timeline event by ID.
Declaration
public bool TryGetEvent(string eventId, out ClientEvent? clientEvent)
Parameters
Returns