Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling edited messages + fixing protocolType() exception
Sometimes, when a verified BOT send a message to the host, after a time, the session starts to throw an exception, that says: `java.lang.NullPointerException: Cannot invoke "it.auties.whatsapp.model.message.server.ProtocolMessage$Type.ordinal()" because the return value of "it.auties.whatsapp.model.message.server.ProtocolMessage.protocolType()" is null at it.auties.whatsapp.socket.MessageHandler.handleProtocolMessage(MessageHandler.java:934) at it.auties.whatsapp.socket.MessageHandler.saveMessage(MessageHandler.java:901) at it.auties.whatsapp.socket.MessageHandler.decodeChatMessage(MessageHandler.java:806) at it.auties.whatsapp.socket.MessageHandler.lambda$decode$55(MessageHandler.java:618) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at it.auties.whatsapp.socket.MessageHandler.decode(MessageHandler.java:618) at it.auties.whatsapp.socket.SocketHandler.decodeMessage(SocketHandler.java:447) at it.auties.whatsapp.socket.StreamHandler.digest(StreamHandler.java:107) at it.auties.whatsapp.socket.SocketHandler.onMessage(SocketHandler.java:201) at it.auties.whatsapp.socket.SocketSession$WebSocketSession.notifyMessage(SocketSession.java:150) at it.auties.whatsapp.socket.SocketSession$WebSocketSession.onBinary(SocketSession.java:139) at it.auties.whatsapp.socket.SocketSession$WebSocketSession.onBinary(SocketSession.java:141) at it.auties.whatsapp.socket.SocketSession$WebSocketSession.onBinary(SocketSession.java:141) `
- Loading branch information