aboutsummaryrefslogtreecommitdiff
path: root/web/revolt/message.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-06-13 09:12:14 -0400
committerXe Iaso <me@xeiaso.net>2023-06-13 09:12:14 -0400
commitdc43b4c55db696304a4045705cb772409f0a67a6 (patch)
tree0c474c9455ba7ec6c9b32c8ae5e701d08b49446c /web/revolt/message.go
parent0ef92708d95d1b3c741a26d5680c9590cf4b97e0 (diff)
downloadx-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.go11
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
}