Skip to content

Commit ee409b7

Browse files
committed
fix: update user change notification to include transform user info
1 parent fc294fa commit ee409b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/meteor/server/methods/saveUserProfile.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { setUserStatusMethod } from '../../app/user-status/server/methods/setUse
1818
import { compareUserPassword } from '../lib/compareUserPassword';
1919
import { compareUserPasswordHistory } from '../lib/compareUserPasswordHistory';
2020
import { removeOtherTokens } from '../lib/removeOtherTokens';
21+
import { getUserInfo } from '../../app/api/server/helpers/getUserInfo';
2122

2223
const MAX_BIO_LENGTH = 260;
2324
const MAX_NICKNAME_LENGTH = 120;
@@ -160,7 +161,7 @@ async function saveUserProfile(
160161
// App IPostUserUpdated event hook
161162
const updatedUser = await Users.findOneById(this.userId);
162163

163-
void notifyOnUserChange({ clientAction: 'updated', id: updatedUser!._id, diff: updatedUser! });
164+
void notifyOnUserChange({ clientAction: 'updated', id: updatedUser!._id, diff: getUserInfo(updatedUser!) });
164165

165166
await Apps.self?.triggerEvent(AppEvents.IPostUserUpdated, { user: updatedUser, previousUser: user });
166167

0 commit comments

Comments
 (0)