Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quoted message overriding contextInfo #492

Closed
wants to merge 9 commits into from

Conversation

Darker935
Copy link
Contributor

When sendMessage is used with quotedMessage parameter, quoted overrides contextInfo present on original message
I don't know if this method is the best method to fix this, but thats the first way I thought

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)
`
This reverts commit 21c777f.
@Darker935 Darker935 closed this May 20, 2024
@Darker935 Darker935 deleted the patch-2 branch May 20, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant