func (s *Server) sendContacts(c *Client) { var msg database.Message msg.Cmd = &database.Command{Name: "send-contacts", Args: database.GetContacts(s.db, c.id)} c.Write(&msg) }
func (s *Server) sendPastMessages(c *Client, contact string) { var msg database.Message msg.Cmd = &database.Command{Name: "send-messages", Args: database.GetMessages(s.db, c.id, contact)} c.Write(&msg) }