From 3a7751910efe7e6ba01c8db2c5aaf937becfce0f Mon Sep 17 00:00:00 2001 From: catbref Date: Mon, 29 Jun 2020 08:38:19 +0100 Subject: [PATCH] Fix /websockets/chat/messages so it disregards group-membership change notifications --- .../java/org/qortal/api/websocket/ChatMessagesWebSocket.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/qortal/api/websocket/ChatMessagesWebSocket.java b/src/main/java/org/qortal/api/websocket/ChatMessagesWebSocket.java index fa860441b..ef04b9504 100644 --- a/src/main/java/org/qortal/api/websocket/ChatMessagesWebSocket.java +++ b/src/main/java/org/qortal/api/websocket/ChatMessagesWebSocket.java @@ -94,6 +94,10 @@ public void onWebSocketMessage(Session session, String message) { } private void onNotify(Session session, ChatTransactionData chatTransactionData, int txGroupId) { + if (chatTransactionData == null) + // There has been a group-membership change, but we're not interested + return; + // We only want group-based messages with our txGroupId if (chatTransactionData.getRecipient() != null || chatTransactionData.getTxGroupId() != txGroupId) return;