3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

fix behavior of echo-message without message-tags

This commit is contained in:
Shivaram Lingamneni 2020-02-20 01:35:03 -05:00
parent 5892680f60
commit 82732d5b5d

View File

@ -1943,10 +1943,15 @@ func dispatchMessageToTarget(client *Client, tags map[string]string, histType hi
// the originating session may get an echo message:
if rb.session.capabilities.Has(caps.EchoMessage) {
if histType == history.Tagmsg && rb.session.capabilities.Has(caps.MessageTags) {
hasTagsCap := rb.session.capabilities.Has(caps.MessageTags)
if histType == history.Tagmsg && hasTagsCap {
rb.AddFromClient(message.Time, message.Msgid, nickMaskString, accountName, tags, command, tnick)
} else {
rb.AddSplitMessageFromClient(nickMaskString, accountName, tags, command, tnick, message)
tagsToSend := tags
if !hasTagsCap {
tagsToSend = nil
}
rb.AddSplitMessageFromClient(nickMaskString, accountName, tagsToSend, command, tnick, message)
}
}
if histType != history.Notice && user.Away() {