3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-12 02:05:50 +00:00

Defend against an edge case NPE in the chat messages websocket.

This commit is contained in:
CalDescent 2021-06-06 10:34:20 +01:00
parent ecf044bed1
commit 319e64bacc

View File

@ -115,6 +115,9 @@ public class ChatMessagesWebSocket extends ApiWebSocket {
} }
private void onNotify(Session session, ChatTransactionData chatTransactionData, List<String> involvingAddresses) { private void onNotify(Session session, ChatTransactionData chatTransactionData, List<String> involvingAddresses) {
if (chatTransactionData == null)
return;
// We only want direct/non-group messages where sender/recipient match our addresses // We only want direct/non-group messages where sender/recipient match our addresses
String recipient = chatTransactionData.getRecipient(); String recipient = chatTransactionData.getRecipient();
if (recipient == null) if (recipient == null)