From dc43b4c55db696304a4045705cb772409f0a67a6 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Tue, 13 Jun 2023 09:12:14 -0400 Subject: web/revolt: thread contexts through, masquerade support Also start working on integrating ln into the stack Signed-off-by: Xe Iaso --- web/revolt/message.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'web/revolt/message.go') diff --git a/web/revolt/message.go b/web/revolt/message.go index 909bfcb..cf7a6dc 100644 --- a/web/revolt/message.go +++ b/web/revolt/message.go @@ -16,12 +16,19 @@ type Message struct { Nonce string `json:"nonce"` ChannelId string `json:"channel"` AuthorId string `json:"author"` - Content *string `json:"content"` + Content string `json:"content,omitempty"` Edited interface{} `json:"edited"` Embeds []*MessageEmbed `json:"embeds"` Attachments []*Attachment `json:"attachments"` Mentions []string `json:"mentions"` Replies []string `json:"replies"` + Masquerade *Masquerade `json:"masquerade"` +} + +type Masquerade struct { + Name string `json:"name"` + AvatarURL string `json:"avatar"` + Color string `json:"colour,omitempty"` } // Attachment struct. @@ -101,7 +108,7 @@ func (m *Message) Edit(content string) error { return err } - m.Content = &content + m.Content = content return nil } -- cgit v1.2.3