func (VS *Server) newConversation(c *gin.Context) {
	user := VS.getUserFomCookie(c, "h_comunication", "newConversation", "user := VS.getUserFomCookie")
	users, b := VS.getArrayIDFromHTML(c, "userID", "Conversation")
	if !b {
		return
	}
	users = append(users, user.ID)
	conver := Conversation{
		ID:    bson.NewObjectId(),
		Users: users,
	}
	VS.addElementToDatabaseWithRegisterFromCentral(c, conver, conver.ID, "h_comunication", "newConversation", "VS.addConversationToDatabase")
	c.Redirect(http.StatusFound, "/comunication/chat/"+conver.ID.Hex())
}
// This handler creates a new conversation
This handler creates a new conversation
// This handler creates a new conversation
func (VS *Server) newConversation(c *gin.Context) {
	user := VS.getUserFomCookie(c, "h_comunication", "newConversation", "user := VS.getUserFomCookie")
	users, b := VS.getArrayIDFromHTML(c, "userID", "Conversation")
	if !b {
		return
	}
	users = append(users, user.ID)
	conver := Conversation{
		ID:    bson.NewObjectId(),
		Users: users,
	}
	VS.addElementToDatabaseWithRegisterFromCentral(c, conver, conver.ID, "h_comunication", "newConversation", "VS.addConversationToDatabase")
	c.Redirect(http.StatusFound, "/comunication/chat/"+conver.ID.Hex())
}
func ( VS * Server ) newConversation ( c * gin . Context ) { user := VS . getUserFomCookie ( c , " " , " " , " " ) users , b := VS . getArrayIDFromHTML ( c , " " , " " ) if ! b { return } users = append ( users , user . ID ) conver := Conversation { ID : bson . NewObjectId ( ) , Users : users , } VS . addElementToDatabaseWithRegisterFromCentral ( c , conver , conver . ID , " " , " " , " " ) c . Redirect ( http . StatusFound , " " + conver . ID . Hex ( ) ) }
This handler creates a new conversation
This handler creates a new conversation