Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 336 Bytes

Readme.md

File metadata and controls

18 lines (14 loc) · 336 Bytes

Websocket

  1. params: user_id & channel_id

Improvement

// user modal
// user.is_online

// On user reconnect logic
func onUserReconnect(user *User) {
	messages := RetrieveMessagesForUser(user.ID)
	for _, message := range messages {
	    user.Conn.WriteMessage(websocket.TextMessage, []byte(message.Content))
	}
}