feat: Add user metadata changing display name and description with sync
All checks were successful
Queue Release Build / prepare (push) Successful in 28s
Deploy Web Apps / deploy (push) Successful in 5m2s
Queue Release Build / build-windows (push) Successful in 16m44s
Queue Release Build / build-linux (push) Successful in 27m12s
Queue Release Build / finalize (push) Successful in 22s

This commit is contained in:
2026-04-17 22:04:18 +02:00
parent 3ba8a2c9eb
commit bd21568726
41 changed files with 1176 additions and 191 deletions

View File

@@ -5,15 +5,14 @@ import {
createEffect,
ofType
} from '@ngrx/effects';
import { Action } from '@ngrx/store';
import { Store } from '@ngrx/store';
import { Store, type Action } from '@ngrx/store';
import { EMPTY } from 'rxjs';
import {
mergeMap,
tap,
withLatestFrom
} from 'rxjs/operators';
import {
import type {
ChatEvent,
Room,
RoomMember,
@@ -394,7 +393,28 @@ export class RoomMembersSyncEffects {
);
}
return this.createRoomMemberUpdateActions(room, members);
const actions = this.createRoomMemberUpdateActions(room, members);
const currentUserId = currentUser?.oderId || currentUser?.id;
for (const member of members) {
const memberId = member.oderId || member.id;
if (!member.avatarUrl || !memberId || memberId === currentUserId) {
continue;
}
actions.push(UsersActions.upsertRemoteUserAvatar({
user: {
id: member.id,
oderId: memberId,
username: member.username,
displayName: member.displayName,
avatarUrl: member.avatarUrl
}
}));
}
return actions;
}
private handleMemberLeave(