blob: 11a0e8210f1a6ab57961dbcd1f3c9124b7c44b0c (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
using System.Text.Json.Serialization;
using LibMatrix.Extensions;
using LibMatrix.Helpers;
using LibMatrix.Interfaces;
namespace LibMatrix.StateEventTypes.Spec;
[MatrixEvent(EventName = "m.room.message")]
public class RoomMessageEventData : IStateEventType {
[JsonPropertyName("body")]
public string Body { get; set; }
[JsonPropertyName("msgtype")]
public string MessageType { get; set; } = "m.notice";
[JsonPropertyName("formatted_body")]
public string FormattedBody { get; set; }
[JsonPropertyName("format")]
public string Format { get; set; }
[JsonPropertyName("m.relates_to")]
public MessageRelatesTo? RelatesTo { get; set; }
/// <summary>
/// Media URI for this message, if any
/// </summary>
[JsonPropertyName("url")]
public string? Url { get; set; }
public class MessageRelatesTo {
[JsonPropertyName("m.in_reply_to")]
public MessageInReplyTo? InReplyTo { get; set; }
public class MessageInReplyTo {
[JsonPropertyName("event_id")]
public string EventId { get; set; }
}
}
}
|