diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-17 16:28:32 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-17 16:28:32 +0100 |
commit | 86942a34a2aa086dee76c9e4e0b6942848e1b979 (patch) | |
tree | e004efb1a284e6d158ed9aaab7f3a582df19026f /connector/irc/irc.go | |
parent | 584312f30805680711557ff6fbe291d2404367fb (diff) | |
download | easybridge-86942a34a2aa086dee76c9e4e0b6942848e1b979.tar.gz easybridge-86942a34a2aa086dee76c9e4e0b6942848e1b979.zip |
Fix XMPP && transmit nicknames from bridges to matrix
Diffstat (limited to 'connector/irc/irc.go')
-rw-r--r-- | connector/irc/irc.go | 12 |
1 files changed, 10 insertions, 2 deletions
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, + }) } } |