3
0
mirror of https://github.com/ergochat/ergo.git synced 2026-06-18 06:37:40 +02:00

Store tags for messages using draft/relaymsg in history

This commit is contained in:
Jokler 2026-06-11 01:04:16 +02:00
parent 2e12a8371f
commit e69f3a36b5

View File

@ -3534,12 +3534,6 @@ func relaymsgHandler(server *Server, client *Client, msg ircmsg.Message, rb *Res
}
nuh := fmt.Sprintf("%s!%s@%s", nick, ident, hostname)
channel.AddHistoryItem(history.Item{
Type: history.Privmsg,
Message: message,
Nick: nuh,
}, "")
// 3 possibilities for tags:
// no tags, the relaymsg tag only, or the relaymsg tag together with all client-only tags
relayTag := map[string]string{
@ -3557,6 +3551,13 @@ func relaymsgHandler(server *Server, client *Client, msg ircmsg.Message, rb *Res
}
}
channel.AddHistoryItem(history.Item{
Type: history.Privmsg,
Message: message,
Nick: nuh,
Tags: fullTags,
}, "")
// actually send the message
channelName := channel.Name()
for _, member := range channel.Members() {