From e18eb1db997a4adf2d6375d01d61ae633d54aae9 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 29 Nov 2020 19:06:12 -0500 Subject: [PATCH 1/2] fix #1411 Clients without event-playback should receive client-only tags in replayed PRIVMSG / NOTICE. --- irc/client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/irc/client.go b/irc/client.go index a6fa6096..7c214339 100644 --- a/irc/client.go +++ b/irc/client.go @@ -1050,7 +1050,8 @@ func (client *Client) replayPrivmsgHistory(rb *ResponseBuffer, items []history.I } batchID = rb.StartNestedHistoryBatch(target) - allowTags := rb.session.capabilities.Has(caps.EventPlayback) + hasEventPlayback := rb.session.capabilities.Has(caps.EventPlayback) + hasTags := rb.session.capabilities.Has(caps.MessageTags) for _, item := range items { var command string switch item.Type { @@ -1059,7 +1060,7 @@ func (client *Client) replayPrivmsgHistory(rb *ResponseBuffer, items []history.I case history.Notice: command = "NOTICE" case history.Tagmsg: - if allowTags { + if hasEventPlayback && hasTags { command = "TAGMSG" } else { continue @@ -1068,7 +1069,7 @@ func (client *Client) replayPrivmsgHistory(rb *ResponseBuffer, items []history.I continue } var tags map[string]string - if allowTags { + if hasTags { tags = item.Tags } // XXX: Params[0] is the message target. if the source of this message is an in-memory From 2d857b21c684f0a36398bdff174f3c14c79df712 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 29 Nov 2020 19:32:58 -0500 Subject: [PATCH 2/2] bump irctest --- irctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irctest b/irctest index d741ab86..14435ce0 160000 --- a/irctest +++ b/irctest @@ -1 +1 @@ -Subproject commit d741ab86d5f63782e746384a553f44b04a672ebb +Subproject commit 14435ce0e8af86d0d0be5d9eca35bf2ab9931b4f