Skip to content

Commit 80c1716

Browse files
author
Thomas Belin
authored
runfix(core): Team member leave event qualified id (#11984)
1 parent 8999692 commit 80c1716

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/script/user/UserRepository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,14 +649,14 @@ export class UserRepository {
649649
* Update a local user from the backend by ID.
650650
*/
651651
updateUserById = async (userId: string | QualifiedId): Promise<void> => {
652-
const localUserEntity = this.findUserById(userId) || new User('', null);
652+
const localUserEntity = this.findUserById(userId) || new User('', '');
653653
const updatedUserData = await this.userService.getUser(userId);
654654
const updatedUserEntity = this.userMapper.updateUserFromObject(localUserEntity, updatedUserData);
655655
if (this.userState.isTeam()) {
656656
this.mapGuestStatus([updatedUserEntity]);
657657
}
658-
if (updatedUserEntity.inTeam() && updatedUserEntity.isDeleted) {
659-
amplify.publish(WebAppEvents.TEAM.MEMBER_LEAVE, updatedUserEntity.teamId, updatedUserEntity.id);
658+
if (updatedUserEntity && updatedUserEntity.inTeam() && updatedUserEntity.isDeleted) {
659+
amplify.publish(WebAppEvents.TEAM.MEMBER_LEAVE, updatedUserEntity.teamId, updatedUserEntity.qualifiedId);
660660
}
661661
};
662662

0 commit comments

Comments
 (0)