@ -7,6 +7,7 @@ const (
MESSAGE_TYPE_USER = 1
MESSAGE_TYPE_GROUP = 2
TEXT = 1
FILE = 2
IMAGE = 3
AUDIO = 4
@ -63,7 +63,7 @@ func (s *Server) Start() {
if msg.To != "" {
// 一般消息,比如文本消息,视频文件消息等
if msg.ContentType >= constant.FILE && msg.ContentType <= constant.VIDEO {
if msg.ContentType >= constant.TEXT && msg.ContentType <= constant.VIDEO {
saveMessage(msg)
if msg.MessageType == constant.MESSAGE_TYPE_USER {
client, ok := s.Clients[msg.To]