Fix /websockets/chat/messages so it disregards group-membership change notifications

This commit is contained in:
catbref 2020-06-29 08:38:19 +01:00
parent 3c139f3e53
commit 3a7751910e

View File

@ -94,6 +94,10 @@ public class ChatMessagesWebSocket extends WebSocketServlet implements ApiWebSoc
}
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;