SHA256
Fix DM name fallbacks and chat header
This commit is contained in:
@@ -116,6 +116,9 @@ export async function loadProfileSnapshot(login) {
|
||||
});
|
||||
}
|
||||
|
||||
const firstName = String(fields.find((field) => field.key === 'first_name')?.value || '').trim();
|
||||
const lastName = String(fields.find((field) => field.key === 'last_name')?.value || '').trim();
|
||||
|
||||
const latestAccountRole = loadLatestByAliasesFromItems(items, ['account_role']);
|
||||
const rawAccountRole = String(latestAccountRole?.value || '').trim().toLowerCase();
|
||||
const accountRole = rawAccountRole === PROFILE_ACCOUNT_ROLE_PRIMARY || rawAccountRole === PROFILE_ACCOUNT_ROLE_NON_VOTING
|
||||
@@ -157,6 +160,8 @@ export async function loadProfileSnapshot(login) {
|
||||
|
||||
return {
|
||||
fields,
|
||||
firstName,
|
||||
lastName,
|
||||
toggles,
|
||||
accountRole,
|
||||
accountRoleTimeMs: latestAccountRole?.timeMs || 0,
|
||||
|
||||
Reference in New Issue
Block a user