mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-21 02:22:05 -08:00
review fix
This commit is contained in:
parent
2a33c1483b
commit
a1bbe0c7f2
4 changed files with 13 additions and 15 deletions
|
|
@ -23,7 +23,7 @@ type ResponseBuffer struct {
|
|||
|
||||
// GetLabel returns the label from the given message.
|
||||
func GetLabel(msg ircmsg.IrcMessage) string {
|
||||
return msg.Tags[caps.LabelTagName.Name()].Value
|
||||
return msg.Tags[caps.LabelTagName].Value
|
||||
}
|
||||
|
||||
// NewResponseBuffer returns a new ResponseBuffer.
|
||||
|
|
@ -90,13 +90,13 @@ func (rb *ResponseBuffer) Send() error {
|
|||
// if label but no batch, add label to first message
|
||||
if useLabel && batch == nil {
|
||||
message := rb.messages[0]
|
||||
message.Tags[caps.LabelTagName.Name()] = ircmsg.MakeTagValue(rb.Label)
|
||||
message.Tags[caps.LabelTagName] = ircmsg.MakeTagValue(rb.Label)
|
||||
rb.messages[0] = message
|
||||
}
|
||||
|
||||
// start batch if required
|
||||
if batch != nil {
|
||||
batch.Start(rb.target, ircmsg.MakeTags(caps.LabelTagName.Name(), rb.Label))
|
||||
batch.Start(rb.target, ircmsg.MakeTags(caps.LabelTagName, rb.Label))
|
||||
}
|
||||
|
||||
// send each message out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue