Changeset 780 in code for trunk/downstream.go


Ignore:
Timestamp:
Feb 9, 2022, 3:58:54 PM (3 years ago)
Author:
delthas
Message:

Fix echo-message for TAGMSG

A previous fix (d4b7bb02da1c) only fixed sending echo-message for
TAGMSG to self. We also need to send echo-message for TAGMSG to
other targets.

Closes: https://todo.sr.ht/~emersion/soju/111

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r768 r780  
    24352435                        })
    24362436
     2437                        echoTags := tags.Copy()
     2438                        echoTags["time"] = irc.TagValue(time.Now().UTC().Format(serverTimeLayout))
     2439                        if uc.account != "" {
     2440                                echoTags["account"] = irc.TagValue(uc.account)
     2441                        }
     2442                        echoMsg := &irc.Message{
     2443                                Tags:    echoTags,
     2444                                Prefix:  &irc.Prefix{Name: uc.nick},
     2445                                Command: "TAGMSG",
     2446                                Params:  []string{upstreamName},
     2447                        }
     2448                        uc.produce(upstreamName, echoMsg, dc)
     2449
    24372450                        uc.updateChannelAutoDetach(upstreamName)
    24382451                }
Note: See TracChangeset for help on using the changeset viewer.