Support changing your own name and handling name change events

This commit is contained in:
Gabe Kangas
2022-05-26 13:52:04 -07:00
parent 5a51b2d779
commit 1d213b71d4
12 changed files with 147 additions and 100 deletions

View File

@@ -86,6 +86,9 @@ func (s *Server) userNameChanged(eventData chatClientEvent) {
receivedEvent.User = savedUser
receivedEvent.ClientID = eventData.client.id
webhooks.SendChatEventUsernameChanged(receivedEvent)
// Resend the client's user so their username is in sync.
eventData.client.sendConnectedClientInfo()
}
func (s *Server) userMessageSent(eventData chatClientEvent) {