0

Update the user object name change time when changing name. Closes #1277

This commit is contained in:
Gabe Kangas 2021-08-13 00:05:13 -07:00
parent a8c5267e18
commit 4ea416fdbe

View File

@ -46,7 +46,9 @@ func (s *ChatServer) userNameChanged(eventData chatClientEvent) {
user.ChangeUsername(eventData.client.User.Id, receivedEvent.NewName)
// Update the connected clients associated user with the new name
now := time.Now()
eventData.client.User = savedUser
eventData.client.User.NameChangedAt = &now
// Send chat event letting everyone about about the name change
savedUser.DisplayName = receivedEvent.NewName