Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(chat) Only display private message dialog for active participants (#13708)

Robert Pintiliif6e2abdf0185
diff --git a/react/features/chat/middleware.ts b/react/features/chat/middleware.ts
index eafb4bd180..e8e5e8d277 100644
--- a/react/features/chat/middleware.ts
+++ b/react/features/chat/middleware.ts
@@ -130,7 +130,10 @@ MiddlewareRegistry.register(store => next => action => {
// recipient. This logic tries to mitigate this risk.
const shouldSendPrivateMessageTo = _shouldSendPrivateMessageTo(state, action);
- if (shouldSendPrivateMessageTo) {
+ const participantExists = shouldSendPrivateMessageTo
+ && getParticipantById(state, shouldSendPrivateMessageTo);
+
+ if (shouldSendPrivateMessageTo && participantExists) {
dispatch(openDialog(ChatPrivacyDialog, {
message: action.message,
participantID: shouldSendPrivateMessageTo