matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
465 stars 150 forks source link

Offline IRC users show up in Matrix user list #1291

Open garrett opened 3 years ago

garrett commented 3 years ago

Describe the bug Some IRC users prefer to not be signed in when they're not on IRC, so they do not use bouncers.

However, Matrix sometimes still shows the presence of a user being online even when they're offline. This sometimes causes the Matrix user to send an in-channel message to the IRC user which will then go unseen, as IRC is stateless whereas Matrix is stateful.

Therefore: Matrix user thinks IRC user has seen something they typed (such as a user: something here in the channel). But: IRC user has not, as they were offline at the time.

To Reproduce Steps to reproduce the behavior:

I'm not sure how to reproduce this, but it has happened multiple times already on my team that uses IRC, where a user or two use Matrix.

  1. Have an IRC channel
  2. Have users on IRC that close their client and are offline sometimes
  3. Have Matrix users
  4. Have Matrix users and IRC users interact
  5. ...Perhaps see the bug eventually, under some circumstances?

Expected behavior I expect Matrix users to see the same user list as IRC users. Matrix users should not see ghost nicks of IRC users, else they may think they're online (when they're not).

Desktop (please complete the following information): I'm on IRC, a co-worker is using the latest desktop Element client on Freenode, I think?

Half-Shot commented 3 years ago

Sounds like we're desyncing the QUIT/PARTs, which feels familiar. Do you have any example channels I can use to look for?

garrett commented 3 years ago

This happened in #cockpit (our development channel for https://cockpit-project.org/) on irc.freenode.net a few times over the past few weeks.

Thanks for looking into this!

gkiagia commented 3 years ago

This happened to me the other day, but I cannot reproduce today...

I joined #pipewire on oftc with my matrix account (nick: gkiagia, showing as gkiagia[m] on irc) and then joined also with a native irc client as 'gkiagia2'. Then I changed my nick on the irc client to 'gkiagia' and that change was not reflected on matrix. Then I quit the irc client... this 'gkiagia2' user stayed on the matrix room until today.

Today, I tried to do the same, but the nickname change was properly reflected on matrix... Finally, quitting the irc client made the 'gkiagia2' user leave the room on matrix

alkisg commented 3 years ago

The https://webchat.freenode.net/#ltsp web IRC client shows 18 users connected. At the same time, inside element, #freenode_#ltsp:matrix.org shows 115 users.

I can see guests/visitors there, like guest88507 or jgee981350, that joined IRC via web chat a month ago, asked something, and disconnected a few minutes later. Why does matrix still remember and list these unregistered users with random nicknames that will never be reused by the same person? What's the point?

Wouldn't it make more sense to only list the 18 users that are actually online?

Btw, is there a way from matrix to see how many users are actually online, or do we have to use an IRC client for this?

j-bauer commented 1 year ago

This problem is really annoying. Any updates on this?