Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/app/features/settings/account/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,12 @@ function ProfileExtended({ profile, userId }: ProfileProps) {
>
<PronounEditor
current={pronouns}
onSave={(p) => handleSaveField('io.fsky.nyx.pronouns', p)}
onSave={(p) => {
handleSaveField('io.fsky.nyx.pronouns', p);
// also save it under the MSC4247 key for better compatibility with other clients,
// even if it's NOT finalized yet, to maximize the chance of pronouns showing up if they're set.
handleSaveField('org.matrix.msc4247.pronouns', p);
}}
/>
</SequenceCard>
<SequenceCard
Expand All @@ -569,10 +574,14 @@ function ProfileExtended({ profile, userId }: ProfileProps) {
value={
profile.extended?.['moe.sable.app.bio'] ||
profile.extended?.['chat.commet.profile_bio'] ||
// setting it also as extera about for better compatibility with existing profiles
profile.extended?.['xyz.extera.about'] ||
profile.bio
}
onSave={(htmlBio) => {
handleSaveField('moe.sable.app.bio', htmlBio);
// remove html tags for the plaintext version for extera about
handleSaveField('xyz.extera.about', htmlBio.replace(/<[^>]*>/g, ''));

const cleanedHtml = htmlBio.replace(/<br\/><\/blockquote>/g, '</blockquote>');
handleSaveField('chat.commet.profile_bio', {
Expand Down
10 changes: 8 additions & 2 deletions src/app/hooks/useUserProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ const normalizeInfo = (info: any): UserProfile => {
'avatar_url',
'displayname',
'io.fsky.nyx.pronouns',
// MSC4247 user pronouns key, for when it eventually gets accepted
'org.matrix.msc4247.pronouns',
'us.cloke.msc4175.tz',
'm.tz',
'moe.sable.app.bio',
'chat.commet.profile_bio',
// for more compatibility with existing profiles, even if it's not ideal.
'xyz.extera.about',
'chat.commet.profile_banner',
'chat.commet.profile_status',
'moe.sable.app.name_color',
Expand All @@ -48,9 +52,11 @@ const normalizeInfo = (info: any): UserProfile => {
return {
avatarUrl: info.avatar_url,
displayName: info.displayname,
pronouns: info['io.fsky.nyx.pronouns'],
// prioritize the MSC4247 key but fall back to the older fsky one, to maximize the chance of showing pronouns if they're set.
pronouns: info['org.matrix.msc4247.pronouns'] || info['io.fsky.nyx.pronouns'],
timezone: info['us.cloke.msc4175.tz'] || info['m.tz'],
bio: info['moe.sable.app.bio'] || info['chat.commet.profile_bio'],
// prefer sable bio but fall back to commet and extera about, which are more widely used at the moment, to maximize the chance of showing something useful.
bio: info['moe.sable.app.bio'] || info['chat.commet.profile_bio'] || info['xyz.extera.about'],
status: info['chat.commet.profile_status'],
bannerUrl: info['chat.commet.profile_banner'],
nameColor: info['moe.sable.app.name_color'],
Expand Down
Loading