Explorar o código

Fix handleMessage call in handleHistory

Tulir Asokan %!s(int64=6) %!d(string=hai) anos
pai
achega
015e42279d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      portal.go

+ 2 - 2
portal.go

@@ -584,8 +584,8 @@ func (portal *Portal) handleHistory(user *User, history *binary.Node) (string, e
 			portal.log.Warnln("Unexpected non-WebMessageInfo item in history response:", rawMessage)
 			continue
 		}
-		fmt.Println("Filling history", message.GetKey(), message.GetMessageTimestamp())
-		portal.handleMessage(PortalMessage{user, whatsapp.ParseProtoMessage(message)})
+		data := whatsapp.ParseProtoMessage(message)
+		portal.handleMessage(PortalMessage{user, data, message.GetMessageTimestamp()})
 		lastID = message.GetKey().GetId()
 	}
 	return lastID, nil