blob: 0488e36061299f2673d8d18600df35bd611f49dc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
@using ArcaneLibs.Extensions
@using LibMatrix.EventTypes.Spec.State
@inherits BaseTimelineItem
@if (currentEventContent is not null) {
@if (previousEventContent is null) {
<i><InlineUserItem User="@CurrentSenderProfile" Homeserver="@Homeserver" UserId="@Event.StateKey"></InlineUserItem> set the room alias to "@currentEventContent.Alias"</i>
}
else {
<i><InlineUserItem User="@CurrentSenderProfile" Homeserver="@Homeserver" UserId="@Event.StateKey"></InlineUserItem> changed the room name from "@previousEventContent.Alias" to "@currentEventContent.Alias"</i>
}
}
else {
<details>
<summary>Unknown event @Event.Type (@Event.StateKey)</summary>
<pre>
@Event.ToJson()
</pre>
</details>
}
@code {
private RoomCanonicalAliasEventContent? previousEventContent => PreviousState?.TypedContent as RoomCanonicalAliasEventContent;
private RoomCanonicalAliasEventContent? currentEventContent => Event.TypedContent as RoomCanonicalAliasEventContent;
}
|