mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
event: add support for MSC3765 rich text room topics
Some checks failed
Some checks failed
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
parent
1cc073cde6
commit
0115ba0258
2 changed files with 19 additions and 7 deletions
|
|
@ -29,12 +29,9 @@ func (content *PollResponseEventContent) SetRelatesTo(rel *RelatesTo) {
|
|||
}
|
||||
|
||||
type MSC1767Message struct {
|
||||
Text string `json:"org.matrix.msc1767.text,omitempty"`
|
||||
HTML string `json:"org.matrix.msc1767.html,omitempty"`
|
||||
Message []struct {
|
||||
MimeType string `json:"mimetype"`
|
||||
Body string `json:"body"`
|
||||
} `json:"org.matrix.msc1767.message,omitempty"`
|
||||
Text string `json:"org.matrix.msc1767.text,omitempty"`
|
||||
HTML string `json:"org.matrix.msc1767.html,omitempty"`
|
||||
Message []ExtensibleText `json:"org.matrix.msc1767.message,omitempty"`
|
||||
}
|
||||
|
||||
type PollStartEventContent struct {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,22 @@ type ServerACLEventContent struct {
|
|||
// TopicEventContent represents the content of a m.room.topic state event.
|
||||
// https://spec.matrix.org/v1.2/client-server-api/#mroomtopic
|
||||
type TopicEventContent struct {
|
||||
Topic string `json:"topic"`
|
||||
Topic string `json:"topic"`
|
||||
ExtensibleTopic *ExtensibleTopic `json:"m.topic,omitempty"`
|
||||
}
|
||||
|
||||
// ExtensibleTopic represents the contents of the m.topic field within the
|
||||
// m.room.topic state event as described in [MSC3765].
|
||||
//
|
||||
// [MSC3765]: https://github.com/matrix-org/matrix-spec-proposals/pull/3765
|
||||
type ExtensibleTopic struct {
|
||||
Text []ExtensibleText `json:"m.text"`
|
||||
}
|
||||
|
||||
// ExtensibleText represents the contents of an m.text field.
|
||||
type ExtensibleText struct {
|
||||
MimeType string `json:"mimetype,omitempty"`
|
||||
Body string `json:"body"`
|
||||
}
|
||||
|
||||
// TombstoneEventContent represents the content of a m.room.tombstone state event.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue