From 86942a34a2aa086dee76c9e4e0b6942848e1b979 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 17 Feb 2020 16:28:32 +0100 Subject: Fix XMPP && transmit nicknames from bridges to matrix --- connector/irc/irc.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'connector/irc/irc.go') diff --git a/connector/irc/irc.go b/connector/irc/irc.go index b673498..a57a2e2 100644 --- a/connector/irc/irc.go +++ b/connector/irc/irc.go @@ -263,12 +263,16 @@ func (irc *IRC) ircJoin(c *girc.Client, e girc.Event) { if e.Source.Name == irc.nick { irc.handler.Joined(room) } else { + user := UserID(e.Source.Name + "@" + irc.server) ev := &Event{ Type: EVENT_JOIN, - Author: UserID(e.Source.Name + "@" + irc.server), + Author: user, Room: room, } irc.handler.Event(ev) + irc.handler.UserInfoUpdated(user, &UserInfo{ + DisplayName: e.Source.Name, + }) } } @@ -277,12 +281,16 @@ func (irc *IRC) ircPart(c *girc.Client, e girc.Event) { if e.Source.Name == irc.nick { irc.handler.Left(room) } else { + user := UserID(e.Source.Name + "@" + irc.server) ev := &Event{ Type: EVENT_LEAVE, - Author: UserID(e.Source.Name + "@" + irc.server), + Author: user, Room: room, } irc.handler.Event(ev) + irc.handler.UserInfoUpdated(user, &UserInfo{ + DisplayName: e.Source.Name, + }) } } -- cgit v1.2.3