Skip to content

bridge: fix unwanted duplicated IRC channels on auto-join#9

Merged
pawelb0 merged 1 commit into
pawelb0:mainfrom
vmiklos:irc-chan-duplicated
Jun 15, 2026
Merged

bridge: fix unwanted duplicated IRC channels on auto-join#9
pawelb0 merged 1 commit into
pawelb0:mainfrom
vmiklos:irc-chan-duplicated

Conversation

@vmiklos

@vmiklos vmiklos commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Have a matrix account configured to be in a multiple matrix rooms, some (but not all) rooms show up as multiple IRC channels after connecting to the IRC server with a client.

It seems this happens for rooms with multiple published addresses: in this case each published address is mapped to an IRC channel, which is an unwanted duplication. This happens because chan_to_room container is used to produce the list of IRC channels to auto-join, which has one entry per published address.

Fix the problem by iterating room_to_chan instead, which gives us exactly one IRC channel per matrix room, even if the room has multiple published addresses.

Also add a test that covers the fix.

Have a matrix account configured to be in a multiple matrix rooms, some
(but not all) rooms show up as multiple IRC channels after connecting to
the IRC server with a client.

It seems this happens for rooms with multiple published addresses: in
this case each published address is mapped to an IRC channel, which is
an unwanted duplication. This happens because chan_to_room container is
used to produce the list of IRC channels to auto-join, which has one
entry per published address.

Fix the problem by iterating room_to_chan instead, which gives us
exactly one IRC channel per matrix room, even if the room has multiple
published addresses.

Also add a test that covers the fix.
@pawelb0 pawelb0 merged commit a2dd5ff into pawelb0:main Jun 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants