diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-06-13 09:12:14 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-06-13 09:12:14 -0400 |
| commit | dc43b4c55db696304a4045705cb772409f0a67a6 (patch) | |
| tree | 0c474c9455ba7ec6c9b32c8ae5e701d08b49446c /web/revolt/message.go | |
| parent | 0ef92708d95d1b3c741a26d5680c9590cf4b97e0 (diff) | |
| download | x-dc43b4c55db696304a4045705cb772409f0a67a6.tar.xz x-dc43b4c55db696304a4045705cb772409f0a67a6.zip | |
web/revolt: thread contexts through, masquerade support
Also start working on integrating ln into the stack
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'web/revolt/message.go')
| -rw-r--r-- | web/revolt/message.go | 11 |
1 files changed, 9 insertions, 2 deletions
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 } |
