From 4ea416fdbe9376cee5ebaf2c16ee9214aa9596a2 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 13 Aug 2021 00:05:13 -0700 Subject: [PATCH] Update the user object name change time when changing name. Closes #1277 --- core/chat/events.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/chat/events.go b/core/chat/events.go index 43372d9c0..6b25bc3fb 100644 --- a/core/chat/events.go +++ b/core/chat/events.go @@ -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