From c52b661c87174895cd9b406e4ac5b293eded1734 Mon Sep 17 00:00:00 2001 From: or-else Date: Sat, 6 Oct 2018 11:49:34 +0300 Subject: [PATCH] check if topic has unsubscribed while processing pending messages --- src/webapp.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webapp.jsx b/src/webapp.jsx index 320c87a8..09617309 100644 --- a/src/webapp.jsx +++ b/src/webapp.jsx @@ -3882,7 +3882,7 @@ class MessagesView extends React.Component { this.props.onNewTopicCreated(props.topic, ctrl.topic); // If there are unsent messages, try sending them now. topic.queuedMessages((pub) => { - if (!pub._sending) { + if (!pub._sending && topic.isSubscribed()) { topic.publishMessage(pub); } });