~taiite/senpai

f9630908b727f96c3b051b6e5a19d9641f15b891 — delthas 3 months ago 6866df0
Support +channel-context

See: https://github.com/ircv3/ircv3-specifications/pull/498
1 files changed, 5 insertions(+), 0 deletions(-)

M irc/session.go
M irc/session.go => irc/session.go +5 -0
@@ 1402,6 1402,11 @@ func (s *Session) newMessageEvent(msg Message) (ev MessageEvent, err error) {
		Time:    msg.TimeOrNow(),
	}

	if s.IsMe(target) {
		if context := msg.Tags["+draft/channel-context"]; context != "" {
			target = context
		}
	}
	targetCf := s.Casemap(target)
	if c, ok := s.channels[targetCf]; ok {
		ev.Target = c.Name