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
1 changed files with 3 additions and 1 deletions

View File

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