Add time tag to echo messages

Closes: https://todo.sr.ht/~emersion/soju/59
This commit is contained in:
Simon Ser 2020-05-05 16:52:50 +02:00
parent f79cf305ab
commit 81e4930931
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -1361,6 +1361,9 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
})
echoMsg := &irc.Message{
Tags: irc.Tags{
"time": irc.TagValue(time.Now().UTC().Format(serverTimeLayout)),
},
Prefix: &irc.Prefix{
Name: uc.nick,
User: uc.username,
@ -1368,7 +1371,6 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
Command: "PRIVMSG",
Params: []string{upstreamName, text},
}
uc.produce(upstreamName, echoMsg, dc)
}
case "NOTICE":