mirror of
https://github.com/diamondburned/cchat-discord.git
synced 2024-12-31 08:07:09 +00:00
Fix buggy message references
This commit is contained in:
parent
cc2b2ee4c7
commit
71c3069fa4
|
@ -284,11 +284,12 @@ func newRegularContent(m discord.Message, s *state.Instance) Message {
|
|||
var content text.Rich
|
||||
|
||||
if m.ReferencedMessage != nil {
|
||||
content.Content = "> "
|
||||
refContent := []byte(m.ReferencedMessage.Content)
|
||||
segments.ParseWithMessageRich(&content, refContent, &m, s.Cabinet)
|
||||
|
||||
content = segments.Ellipsize(content, 100)
|
||||
content.Content = ">" + content.Content + "\n"
|
||||
content.Content += "\n"
|
||||
|
||||
segutil.Add(&content,
|
||||
reference.NewMessageSegment(0, len(content.Content)-1, m.ReferencedMessage.ID),
|
||||
|
|
Loading…
Reference in a new issue