示例#1
0
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)
}
示例#2
0
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)
}