mirror of
https://github.com/wassname/talk.git
synced 2026-08-14 12:50:17 +08:00
Add previous username to notification
This commit is contained in:
@@ -57,7 +57,8 @@ const stopIgnoringUser = ({ user }, userToStopIgnoring) => {
|
||||
|
||||
const changeUsername = async (ctx, id, username) => {
|
||||
const user = await UsersService.changeUsername(id, username, ctx.user.id);
|
||||
ctx.pubsub.publish('usernameChanged', user);
|
||||
const previousUsername = ctx.user.username;
|
||||
ctx.pubsub.publish('usernameChanged', { previousUsername, user });
|
||||
return user;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user