Skip to content

fix(muc): use profile username as default nick everywhere (#920)#964

Merged
mremond merged 1 commit into
mainfrom
mr/issue-920-verification-ea77ac
Jul 10, 2026
Merged

fix(muc): use profile username as default nick everywhere (#920)#964
mremond merged 1 commit into
mainfrom
mr/issue-920-verification-ea77ac

Conversation

@mremond

@mremond mremond commented Jul 10, 2026

Copy link
Copy Markdown
Member

Closes #920.

The app didn't consistently use the profile username (XEP-0172 PEP nick) as the default MUC nickname. The manual join modals already did, but two paths ignored it:

  • Accepting a room invitation joined under the bare-JID local part.
  • fetchBookmarks hardcoded 'user' when a bookmark had no <nick>.

This adds a single shared helper resolveDefaultMucNick(ownNickname, jid) (profile nick → JID local part, whitespace-hardened) and routes all five call sites through it, including the three join modals for consistency.

Side effect: an autojoin bookmark that omits <nick> now rejoins under the resolved default instead of being silently skipped.

MUC joins now default to the profile username (XEP-0172 PEP nick),
falling back to the bare-JID local part, via a single shared helper
resolveDefaultMucNick. Previously two paths ignored the profile nick:
accepting a room invitation joined under the JID local part, and
fetchBookmarks hardcoded 'user' when a bookmark carried no <nick>.

The three join modals already used the profile nick and are refactored
onto the same helper so every call site agrees. An autojoin bookmark
that omits <nick> now rejoins under the resolved default instead of
being silently skipped.
@mremond mremond added this to the 0.17.1 milestone Jul 10, 2026
@mremond mremond merged commit fb20e24 into main Jul 10, 2026
3 checks passed
@mremond mremond deleted the mr/issue-920-verification-ea77ac branch July 10, 2026 12:43
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.

Use profile username as the default nick in MUC

1 participant