Skip to content

Fix group and channel invitations displayed as 1:1 invites#51

Merged
adbenitez merged 6 commits into
mainfrom
copilot/fix-group-channel-invitation-display
Feb 24, 2026
Merged

Fix group and channel invitations displayed as 1:1 invites#51
adbenitez merged 6 commits into
mainfrom
copilot/fix-group-channel-invitation-display

Conversation

Copilot AI commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Invite links for groups (g=) and channels (b=) that also include the inviter's name (n=) were showing the user's name instead of the group/channel name, making them indistinguishable from personal invitations.

Changes

  • Name display priority — reordered parameter lookup to prefer group/channel name over user name:
    // Before
    searchParams.get("n") || searchParams.get("g") || searchParams.get("a")
    // After
    searchParams.get("g") || searchParams.get("b") || searchParams.get("n") || searchParams.get("a")
  • "Join" text — extended the trigger condition to include b= (broadcast/channel), not just g= (group), in both the reactInput() pre-i18n path and the i18next callback
  • Tests — updated the name context (removed stray g= param), added cases for group-over-name priority, broadcast display, and broadcast-over-name priority; added broadcast localization test
Original prompt

This section details on the original issue you should resolve

<issue_title>group and channel invitations shown as 1:1 invitation</issue_title>
<issue_description>recently now the invite links contain the user's name even when it is a group or channel invitation, the page is displaying group/channel invitations as 1:1 invites

this is an example group invitation link:

https://i.delta.chat/#B68D965B65A63B3E7EB32D56245652E2C899213F&x=A-ylp1JHsD6-0XQ6c20Rk-6T&i=7oc7RE-CKaaOyT3thcw94UmB&s=tDtfDDPew-7sz8dC8nw-5y72&a=ps1n1dwin%40arcanechat.me&n=adb+%28TL%3BDR%29&g=food+lovers

and this is an example channel invite:

https://i.delta.chat/#0A45953086F0C166D3BAF1D4BB2025496E4C2704&x=MVPi07rQBEmHO4FRb3brpwDe&j=n8mkKqu42WAKKUCx1bQOVh23&s=eBWTd022E21N8QvAjRv6zRuE&a=arcanechat%40arcanechat.me&n=MyName&b=ArcaneChat+Channel
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix group and channel invitations displayed as 1:1 invites Fix group and channel invitations displayed as 1:1 invites Feb 21, 2026
Copilot AI requested a review from adbenitez February 21, 2026 19:40
@adbenitez adbenitez requested a review from Copilot February 21, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where group and channel invitation links were incorrectly displaying the inviter's personal name instead of the group/channel name, making them indistinguishable from 1:1 personal invitations.

Changes:

  • Reordered parameter lookup priority to check group (g=) and broadcast/channel (b=) names before user name (n=)
  • Extended the "Join" button text condition to include broadcast parameter (b=) alongside group parameter (g=)
  • Added comprehensive test coverage for the new parameter priority behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
index.html Updated parameter priority to prefer group/channel names over user names, and extended join button logic to include broadcast parameter in both pre-i18n and i18next code paths
ui-test-_misc.js Corrected existing test by removing stray g= parameter, and added new test cases for group-over-name, broadcast, and broadcast-over-name priority scenarios
ui-test-_localize.js Added localization test for broadcast invitations to verify correct "Join" text is displayed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@r10s r10s marked this pull request as ready for review February 24, 2026 00:36
@r10s

r10s commented Feb 24, 2026

Copy link
Copy Markdown
Member

did not check the tests, as i am not into that test framework.

the other code changes lgtm - and are quite simple. it is really only displaying the other name

@adbenitez adbenitez merged commit 9a1f9d1 into main Feb 24, 2026
2 checks passed
@adbenitez adbenitez deleted the copilot/fix-group-channel-invitation-display branch February 24, 2026 16:46
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.

group and channel invitations shown as 1:1 invitation

4 participants