Matrix-appservice-irc: Track nick changes on IRC

Created on 15 Jun 2016  路  11Comments  路  Source: matrix-org/matrix-appservice-irc

IRC users changing nicks should not spawn new matrix users, rather update their display names.

72 is needed for this.

feature-req refactor

All 11 comments

This still seems to be a problem - if a user in IRC changes their nick then a new user appears on the Matrix side, the old nick still seems to sit in the channel forever and "dead" users on the Matrix side never ever get cleaned up by the appservice, even after a server restart or with full membership syncing enabled.

Is there any plan to fix this? At the very least, the appservice should clean up after itself!

even after a server restart or with full membership syncing enabled

Restarting the bridge will remove those users, assuming initial leave syncing is enabled, as that will do a full sweep of all bridged rooms looking for users to evict.

As an aside, it may surprise you to know that comments like the following on a project which is actively maintained and triaged come across as pretty rude.

This still seems to be a problem

Really? I wonder if that's why this issue is still open.

Is there any plan to fix this?

No, I like leaving issues open forever and never plan on fixing them. I just triage issues for fun.


@Kegsay: This is a big issue IMHO. I'm wondering why this is not a problem for others, still think I might do something wrong. When an IRC user joins a bridged channel, and changes it's nick, this will be not reflected on the matrix side, although member sync is enabled. So I don't even see the "spawn new matrix user", which would at least work somehow. When this user leaves the channel, the old "dead" nick will still be left over, because the user with the new nick is tried to be removed. This is not a feature request, but a bug in my eyes.

I checked the code, and the "nick" command from node-irc is not taken care of at all. Why not handling that and change the display name of the according virtual matrix user? I have a patch for this ready, and will try it now. But I'm not sure if I forgot something important, because this issue is tagged with "refactor".

@ansiwen the hard part about this is that completely unrelated people can be using the same IRC nick. What should happen when Bob changes their nick to Alice, goes offline and then Charlie joins and changes his nick to Bob? This and other (non-)edge cases break tons of stuff starting from 1:1 chats. The only way to retain a semblance of sanity is to generate ghost users based on the IRC users' host+username, which has its own share of Fun.

Anyway if this is an important issue to you and you are interested in contributing I recommend starting from #72

Why not handling that and change the display name of the according virtual matrix user?

You can't do that. The code relies on the nick to build the localpart, and then found the corresponding user. So if an irc user change his nick, it's localpart change too, and it's a new user on the Matrix side. This may be bad, but this need a big change (that's why this issue is tagged with "refactor"). See #72 as says @jansol .

Anyway, on a nick change, what can be done and would not be a big refactor is to make the user corresponding to the old nick leaving and the new one joining. Of course this should be done only when member sync is enabled. I will give it a look.

@erdnaxeli @jansol Ok, I see, to have the same effect as leaving and joining, I would also have to change the localpart of the virtual matrix-user, not only its display name. And I guess, this is not possible?

@erdnaxeli just letting the changed user leave and rejoin with the new nick was actually what I tried first, but I thought, changing the displayname directly would be nicer. (I forgot about the localpart.) I can push that first version, no need for you to do it again.

@erdnaxeli How about #517?

@ansiwen Indeed, changing a user's mxid is currently not possible since the mxid uniquely identifies matrix users.

I hope user MXID's can be random numbers in the future: https://github.com/vector-im/riot-web/issues/5336

Really sorry for commenting on this closed issue. But I have found a small problem with the implementation.

It occurs in moderated channels with users set to voice that are mapped to Matrix powerlevels. For instance on my channel Voiced users are given a powerlevel of 1.

When a user /nicks .... (And I have a somewhat frustrating user who really loves changing his nick in response to everything)... On the Matrix side, the old username parts and the new one joins.... But the custom powerlevel is not propagated. Which results in as soon as someone changes their nick in the moderated channel the new nick receives a powerlevel of 0. This results in the expected; at this point behaviour of what they type in IRC not being visible in Matrix.

@ninlilizi This really needs a new issue, I'd suggest opening one about that particular problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rcurtin picture rcurtin  路  5Comments

colemickens picture colemickens  路  4Comments

Spydar007 picture Spydar007  路  5Comments

Nick-Hall picture Nick-Hall  路  3Comments

Platypuschan picture Platypuschan  路  4Comments