diff --git a/djangocms_blog/liveblog/consumers.py b/djangocms_blog/liveblog/consumers.py index 91041e9..8635f89 100644 --- a/djangocms_blog/liveblog/consumers.py +++ b/djangocms_blog/liveblog/consumers.py @@ -27,6 +27,7 @@ def liveblog_connect(message, apphook, lang, post): }) return Group(post.liveblog_group).add(message.reply_channel) + message.reply_channel.send({"accept": True}) def liveblog_disconnect(message, apphook, lang, post): diff --git a/tests/test_liveblog.py b/tests/test_liveblog.py index 93ec18a..a9784a0 100644 --- a/tests/test_liveblog.py +++ b/tests/test_liveblog.py @@ -38,6 +38,8 @@ try: Channel('setup').send({'connect': 1, 'reply_channel': 'reply'}) message = self.get_next_message('setup', require=True) liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug) + result = self.get_next_message(message.reply_channel.name, require=True) + self.assertTrue(result['accept']) plugin = add_plugin( post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True @@ -80,6 +82,8 @@ try: Channel('setup').send({'connect': 1, 'reply_channel': 'reply'}) message = self.get_next_message('setup', require=True) liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug) + result = self.get_next_message(message.reply_channel.name, require=True) + self.assertTrue(result['accept']) plugin = add_plugin( post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=False @@ -114,6 +118,8 @@ try: Channel('setup').send({'connect': 1, 'reply_channel': 'reply'}) message = self.get_next_message('setup', require=True) liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug) + result = self.get_next_message(message.reply_channel.name, require=True) + self.assertTrue(result['accept']) plugin = add_plugin( post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True