forked from External/ergo
bake in url info
This commit is contained in:
parent
a529158fe1
commit
f9a0be2473
5 changed files with 117 additions and 12 deletions
|
|
@ -570,6 +570,16 @@ func batchHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respon
|
|||
// XXX changing the label inside a handler is a bit dodgy, but it works here
|
||||
// because there's no way we could have triggered a flush up to this point
|
||||
rb.Label = batch.responseLabel
|
||||
|
||||
for _, msg := range batch.message.Split {
|
||||
signatures := utils.GenerateImagorSignatures(msg.Message)
|
||||
if len(signatures) > 0 {
|
||||
if msg.Tags == nil {
|
||||
msg.Tags = make(map[string]string)
|
||||
}
|
||||
msg.Tags["signatures"] = signatures
|
||||
}
|
||||
}
|
||||
dispatchMessageToTarget(client, batch.tags, histType, batch.command, batch.target, batch.message, rb)
|
||||
}
|
||||
}
|
||||
|
|
@ -2318,6 +2328,13 @@ func messageHandler(server *Server, client *Client, msg ircmsg.Message, rb *Resp
|
|||
|
||||
// each target gets distinct msgids
|
||||
splitMsg := utils.MakeMessage(message)
|
||||
signatures := utils.GenerateImagorSignaturesFromMessage(&msg)
|
||||
if len(signatures) > 0 {
|
||||
if clientOnlyTags == nil {
|
||||
clientOnlyTags = make(map[string]string)
|
||||
}
|
||||
clientOnlyTags["signatures"] = signatures
|
||||
}
|
||||
dispatchMessageToTarget(client, clientOnlyTags, histType, msg.Command, targetString, splitMsg, rb)
|
||||
}
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue