mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
commit
b80f92b2aa
@ -1017,7 +1017,7 @@ func (channel *Channel) replayHistoryItems(rb *ResponseBuffer, items []history.I
|
|||||||
case history.Notice:
|
case history.Notice:
|
||||||
rb.AddSplitMessageFromClient(item.Nick, item.AccountName, item.Tags, "NOTICE", chname, item.Message)
|
rb.AddSplitMessageFromClient(item.Nick, item.AccountName, item.Tags, "NOTICE", chname, item.Message)
|
||||||
case history.Tagmsg:
|
case history.Tagmsg:
|
||||||
if rb.session.capabilities.Has(caps.MessageTags) {
|
if eventPlayback {
|
||||||
rb.AddSplitMessageFromClient(item.Nick, item.AccountName, item.Tags, "TAGMSG", chname, item.Message)
|
rb.AddSplitMessageFromClient(item.Nick, item.AccountName, item.Tags, "TAGMSG", chname, item.Message)
|
||||||
}
|
}
|
||||||
case history.Join:
|
case history.Join:
|
||||||
|
@ -897,7 +897,7 @@ func (client *Client) replayPrivmsgHistory(rb *ResponseBuffer, items []history.I
|
|||||||
}
|
}
|
||||||
batchID = rb.StartNestedHistoryBatch(target)
|
batchID = rb.StartNestedHistoryBatch(target)
|
||||||
|
|
||||||
allowTags := rb.session.capabilities.Has(caps.MessageTags)
|
allowTags := rb.session.capabilities.Has(caps.EventPlayback)
|
||||||
for _, item := range items {
|
for _, item := range items {
|
||||||
var command string
|
var command string
|
||||||
switch item.Type {
|
switch item.Type {
|
||||||
|
@ -119,7 +119,12 @@ func (rb *ResponseBuffer) AddFromClient(time time.Time, msgid string, fromNickMa
|
|||||||
// AddSplitMessageFromClient adds a new split message from a specific client to our queue.
|
// AddSplitMessageFromClient adds a new split message from a specific client to our queue.
|
||||||
func (rb *ResponseBuffer) AddSplitMessageFromClient(fromNickMask string, fromAccount string, tags map[string]string, command string, target string, message utils.SplitMessage) {
|
func (rb *ResponseBuffer) AddSplitMessageFromClient(fromNickMask string, fromAccount string, tags map[string]string, command string, target string, message utils.SplitMessage) {
|
||||||
if message.Is512() {
|
if message.Is512() {
|
||||||
|
if message.Message == "" {
|
||||||
|
// XXX this is a TAGMSG
|
||||||
|
rb.AddFromClient(message.Time, message.Msgid, fromNickMask, fromAccount, tags, command, target)
|
||||||
|
} else {
|
||||||
rb.AddFromClient(message.Time, message.Msgid, fromNickMask, fromAccount, tags, command, target, message.Message)
|
rb.AddFromClient(message.Time, message.Msgid, fromNickMask, fromAccount, tags, command, target, message.Message)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if rb.session.capabilities.Has(caps.Multiline) {
|
if rb.session.capabilities.Has(caps.Multiline) {
|
||||||
batch := rb.session.composeMultilineBatch(fromNickMask, fromAccount, tags, command, target, message)
|
batch := rb.session.composeMultilineBatch(fromNickMask, fromAccount, tags, command, target, message)
|
||||||
|
@ -90,7 +90,7 @@ func (sm *SplitMessage) IsRestrictedCTCPMessage() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (sm *SplitMessage) Is512() bool {
|
func (sm *SplitMessage) Is512() bool {
|
||||||
return sm.Message != ""
|
return sm.Split == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenLineBuilder is a helper for building IRC lines composed of delimited tokens,
|
// TokenLineBuilder is a helper for building IRC lines composed of delimited tokens,
|
||||||
|
Loading…
Reference in New Issue
Block a user